Socket
Socket
Sign inDemoInstall

@antv/g-gesture

Package Overview
Dependencies
Maintainers
64
Versions
153
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antv/g-gesture - npm Package Compare versions

Comparing version 0.0.81 to 0.0.82

dist/packages/g-plugin-annotation/src/selectable/SelectableImage.d.ts

2

dist/packages/g-canvas/src/Canvas2DContextService.d.ts

@@ -10,3 +10,3 @@ import type { CanvasContext, CanvasLike, DataURLOptions, GlobalRuntime, ContextService } from '@antv/g-lite';

constructor(context: GlobalRuntime & CanvasContext);
init(): Promise<void>;
init(): void;
getContext(): CanvasRenderingContext2D;

@@ -13,0 +13,0 @@ getDomElement(): CanvasLike;

@@ -19,3 +19,3 @@ import type { CanvasContext, CanvasLike, DataURLOptions, GlobalRuntime, ContextService } from '@antv/g-lite';

constructor(context: GlobalRuntime & CanvasContext);
init(): Promise<void>;
initAsync(): Promise<void>;
getContext(): CanvaskitRenderer.CanvasKitContext;

@@ -22,0 +22,0 @@ getDomElement(): CanvasLike;

@@ -19,3 +19,4 @@ import type { IRenderer } from './AbstractRenderer';

RESIZE = "resize",
DIRTY_RECTANGLE = "dirtyrectangle"
DIRTY_RECTANGLE = "dirtyrectangle",
RENDERER_CHANGED = "rendererchanged"
}

@@ -129,4 +130,5 @@ /**

private initRenderer;
private initRenderingService;
private loadRendererContainerModule;
setRenderer(renderer: IRenderer): Promise<void>;
setRenderer(renderer: IRenderer): void;
setCursor(cursor: Cursor): void;

@@ -133,0 +135,0 @@ unmountChildren(parent: DisplayObject): void;

import type { INode } from '../dom/interfaces';
export declare enum SortReason {
ADDED = 0,
REMOVED = 1,
Z_INDEX_CHANGED = 2
}
export interface Sortable {

@@ -12,10 +17,11 @@ /**

/**
* index in parent's children
* render order in whole scenegraph
*/
lastSortedIndex: number;
renderOrder: number;
/**
* render order in whole scenegraph
* dirty children
*/
renderOrder: number;
dirtyChildren: INode[];
dirtyReason: SortReason;
}
//# sourceMappingURL=Sortable.d.ts.map
import EventEmitter from 'eventemitter3';
import { FederatedEvent } from './FederatedEvent';
import type { IEventTarget } from './interfaces';
import type { IEventTarget, EventListenerOrEventListenerObject } from './interfaces';
/**

@@ -5,0 +5,0 @@ * Objects that can receive events and may have listeners for them.

@@ -44,6 +44,2 @@ import type RBush from 'rbush';

BOUNDS_CHANGED = "bounds-changed",
/**
* trigger when z-index changed
*/
RENDER_ORDER_CHANGED = "render-order-changed",
CULLED = "culled"

@@ -438,2 +434,10 @@ }

}
interface EventListener {
(evt: FederatedEvent): void;
}
interface EventListenerObject {
handleEvent(object: FederatedEvent): void;
}
export type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
export {};
//# sourceMappingURL=interfaces.d.ts.map

@@ -16,2 +16,3 @@ import type { RenderingPlugin, RenderingPluginContext } from '../services';

private onPointerMove;
private onClick;
private getViewportXY;

@@ -18,0 +19,0 @@ private bootstrapEvent;

@@ -18,3 +18,4 @@ import type { CanvasLike } from '../types';

export interface ContextService<Context> {
init: () => Promise<void>;
init?: () => void;
initAsync?: () => Promise<void>;
destroy: () => void;

@@ -21,0 +22,0 @@ getContext: () => Context | null;

@@ -6,3 +6,3 @@ import type { GlobalRuntime } from '../global-runtime';

import type { EventPosition, InteractivePointerEvent, CanvasConfig } from '../types';
import { AsyncParallelHook, AsyncSeriesWaterfallHook, SyncHook, SyncWaterfallHook } from '../utils';
import { AsyncSeriesWaterfallHook, SyncHook, SyncWaterfallHook } from '../utils';
export type RenderingPluginContext = CanvasContext & GlobalRuntime;

@@ -39,6 +39,2 @@ export interface RenderingPlugin {

private zIndexCounter;
/**
* avoid re-creating too many custom events
*/
private renderOrderChangedEvent;
hooks: {

@@ -48,3 +44,3 @@ /**

*/
init: AsyncParallelHook<[]>;
init: SyncHook<[], void>;
/**

@@ -96,3 +92,3 @@ * only dirty object which has sth changed will be rendered

};
init(): Promise<void>;
init(): void;
getStats(): {

@@ -116,2 +112,3 @@ /**

private renderDisplayObject;
private sort;
destroy(): void;

@@ -118,0 +115,0 @@ dirtify(): void;

import { mat4, quat, vec2, vec3 } from 'gl-matrix';
import type { Transform } from '../components';
import { Transform } from '../components';
import type { DisplayObject } from '../display-objects';

@@ -4,0 +4,0 @@ import type { IElement, INode, IParentNode } from '../dom/interfaces';

import type { vec2, vec3 } from 'gl-matrix';
import type { IEventTarget } from '.';
import type { IRenderer } from './AbstractRenderer';

@@ -234,3 +233,3 @@ import type { CSSGlobalKeywords, CSSGradientValue, CSSRGB, CSSUnitValue } from './css';

*/
export interface CanvasLike extends IEventTarget {
export interface CanvasLike extends EventTarget {
width: number;

@@ -237,0 +236,0 @@ height: number;

import type { IElement } from '../dom';
import type { DisplayObject } from '../display-objects';
import type { CanvasLike } from '../types';
export declare function sortedIndex(array: IElement[], value: IElement): number;
export declare function sortByZIndex(o1: IElement, o2: IElement): number;

@@ -5,0 +6,0 @@ export declare function findClosestClipPathTarget(object: DisplayObject): DisplayObject;

@@ -13,3 +13,3 @@ import type { DisplayObject } from '@antv/g-lite';

private getAnnotationPlugin;
private getAnnotationPluginOptions;
getAnnotationPluginOptions(): AnnotationPluginOptions;
updateDrawerStyle(style: Partial<DrawerStyle>): void;

@@ -21,3 +21,3 @@ updateSelectableStyle(style: Partial<SelectableStyle>): void;

*/
selectDisplayObject(displayObject: DisplayObject): void;
selectDisplayObject(displayObject: DisplayObject, skipEvent?: boolean): void;
/**

@@ -29,2 +29,6 @@ * hide selectable UI of target displayobject

markSelectableUIAsDirty(object: DisplayObject): void;
/**
* Keep selectable state and don't trigger SELECT event
*/
refreshSelectableUI(object: DisplayObject): void;
addEventListener(eventName: string, fn: (...args: any[]) => void): void;

@@ -41,2 +45,3 @@ removeEventListener(eventName: string, fn: (...args: any[]) => void): void;

allowTargetRotation(allowed: boolean): void;
getSelectableUI(target: DisplayObject): import("./selectable/interface").Selectable;
destroy(): void;

@@ -43,0 +48,0 @@ }

@@ -5,3 +5,4 @@ export * from './SelectableCircle';

export * from './SelectableRect';
export * from './SelectableImage';
export * from './SelectableRectPolygon';
//# sourceMappingURL=index.d.ts.map

@@ -51,3 +51,3 @@ import type { Canvas, DisplayObject, Rect, RenderingPlugin, RenderingPluginContext } from '@antv/g-lite';

getSelectedDisplayObjects(): DisplayObject<any, any>[];
selectDisplayObject(displayObject: DisplayObject): void;
selectDisplayObject(displayObject: DisplayObject, skipEvent?: boolean): void;
deselectDisplayObject(displayObject: DisplayObject): void;

@@ -54,0 +54,0 @@ /**

@@ -9,2 +9,3 @@ import type { DataURLOptions, GlobalRuntime } from '@antv/g-lite';

import { TexturePool } from './TexturePool';
import { RendererParameters } from './interfaces';
export * from './geometries';

@@ -23,9 +24,11 @@ export * from './interfaces';

name: string;
parameters: RendererParameters;
init(runtime: GlobalRuntime): void;
destroy(runtime: GlobalRuntime): void;
private getRenderGraphPlugin;
getDevice(): any;
loadTexture(src: string | TexImageSource, descriptor?: TextureDescriptor, successCallback?: (t: Texture) => void): any;
toDataURL(options: Partial<DataURLOptions>): any;
getDevice(): import("./platform").Device;
loadTexture(src: string | TexImageSource, descriptor?: TextureDescriptor, successCallback?: (t: Texture) => void): Texture;
toDataURL(options: Partial<DataURLOptions>): Promise<any>;
setParameters(parameters: Partial<RendererParameters>): void;
}
//# sourceMappingURL=index.d.ts.map

@@ -5,2 +5,14 @@ import type { SwapChain } from './platform';

}
export declare enum ToneMapping {
NONE = "none",
LINEAR = "LinearToneMapping",
REINHARD = "ReinhardToneMapping",
CINEON = "OptimizedCineonToneMapping",
ACES_FILMIC = "ACESFilmicToneMapping",
CUSTOM = "CustomToneMapping"
}
export interface RendererParameters {
toneMapping: ToneMapping;
toneMappingExposure: number;
}
//# sourceMappingURL=interfaces.d.ts.map

@@ -154,3 +154,3 @@ import type { Tuple4Number } from '@antv/g-lite';

set fragmentShader(value: string);
defines: Record<string, number | boolean>;
defines: Record<string, number | boolean | string>;
uniforms: Record<string, number | number[] | Float32Array>;

@@ -157,0 +157,0 @@ uniformNames: string[];

@@ -58,2 +58,7 @@ import type { DisplayObject } from '@antv/g-lite';

/**
* assigned by user which help BatchManager deciding whether to merge,
* e.g. `will-change` property in CSS
*/
key: string;
/**
* index in renderer.meshes

@@ -60,0 +65,0 @@ */

@@ -13,2 +13,4 @@ import type { DisplayObject } from '@antv/g-lite';

private glyphManager;
private packedBufferObjectMap;
private tmpMat4;
shouldMerge(object: DisplayObject, index: number): boolean;

@@ -15,0 +17,0 @@ createGeometry(objects: DisplayObject[]): void;

@@ -0,1 +1,2 @@

import { RendererParameters, ToneMapping } from '../interfaces';
import type { Device } from '../platform';

@@ -8,2 +9,3 @@ import { DynamicUniformBuffer } from './DynamicUniformBuffer';

export declare class RenderHelper {
private parameters;
renderCache: RenderCache;

@@ -14,2 +16,3 @@ renderGraph: RenderGraph;

private device;
constructor(parameters: RendererParameters);
getDevice(): Device;

@@ -21,3 +24,7 @@ setDevice(device: Device): void;

getCache(): RenderCache;
getDefines(): {
USE_TONEMAPPING: boolean;
toneMapping: ToneMapping;
};
}
//# sourceMappingURL=RenderHelper.d.ts.map

@@ -13,3 +13,2 @@ import type { DisplayObject } from '@antv/g-lite';

export declare abstract class Batch {
id: number;
/**

@@ -19,3 +18,3 @@ * describe render insts used in this draw call

*/
meshes: typeof Instanced[];
meshes: (typeof Instanced)[];
private clipPathMeshCreated;

@@ -22,0 +21,0 @@ shouldSubmitRenderInst(object: DisplayObject, index: number): boolean;

@@ -33,2 +33,3 @@ import type { DataURLOptions, RenderingPlugin, RenderingPluginContext } from '@antv/g-lite';

private builder;
private pendingDisplayObjects;
private enableCapture;

@@ -35,0 +36,0 @@ private captureOptions;

import { ResourceType } from '@antv/g-plugin-device-renderer';
import type { Format, RenderTarget, RenderTargetDescriptor, Texture } from '@antv/g-plugin-device-renderer';
import { Format, RenderTarget, RenderTargetDescriptor, Texture } from '@antv/g-plugin-device-renderer';
import type { Device_GL } from './Device';

@@ -4,0 +4,0 @@ import { ResourceBase_GL } from './ResourceBase';

import { ResourceType } from '@antv/g-plugin-device-renderer';
import type { Format, SamplerFormatKind, Texture, TextureDescriptor } from '@antv/g-plugin-device-renderer';
import { Format, SamplerFormatKind, Texture, TextureDescriptor } from '@antv/g-plugin-device-renderer';
import type { Device_GL } from './Device';

@@ -4,0 +4,0 @@ import { ResourceBase_GL } from './ResourceBase';

@@ -9,3 +9,3 @@ import type { CanvasContext, DataURLOptions, GlobalRuntime, ContextService } from '@antv/g-lite';

constructor(context: GlobalRuntime & CanvasContext);
init(): Promise<void>;
init(): void;
getDomElement(): SVGElement;

@@ -12,0 +12,0 @@ getContext(): SVGElement;

@@ -9,3 +9,3 @@ import type { CanvasContext, CanvasLike, DataURLOptions, GlobalRuntime, ContextService } from '@antv/g-lite';

constructor(context: GlobalRuntime & CanvasContext);
init(): Promise<void>;
init(): void;
getDomElement(): CanvasLike;

@@ -12,0 +12,0 @@ getContext(): WebGLRenderingContext | WebGL2RenderingContext;

@@ -10,3 +10,3 @@ /// <reference types="@webgpu/types" />

constructor(context: GlobalRuntime & CanvasContext);
init(): Promise<void>;
init(): void;
getDomElement(): CanvasLike;

@@ -13,0 +13,0 @@ getContext(): GPUCanvasContext;

{
"name": "@antv/g-gesture",
"version": "0.0.81",
"version": "0.0.82",
"description": "G Gesture",

@@ -37,3 +37,3 @@ "keywords": [

"devDependencies": {
"@antv/g-mobile-canvas": "^0.8.54",
"@antv/g-mobile-canvas": "^0.8.55",
"@antv/g-mobile-canvas-element": "^0.6.49"

@@ -47,3 +47,3 @@ },

},
"gitHead": "53932c66ed9f2cbc28993e1e359c8df27703fc52"
"gitHead": "913171a90ea08e7e4210b479faaaa0f4271a0af8"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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