🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@expofp/renderer

Package Overview
Dependencies
Maintainers
5
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@expofp/renderer - npm Package Compare versions

Comparing version
2.3.2
to
3.0.0
+62
-40
dist/index.d.ts

@@ -148,3 +148,3 @@ import { default as default_2 } from 'stats-gl';

/** Viewport pixel to svg scale */
"viewport:ptscale": number;
"viewport:ptscale": PtScaleEventData;
}

@@ -298,6 +298,4 @@

event: MouseEvent;
/** Point in svg coordinates */
point: Vector2Like;
/** Intersected defs */
defs: RenderableDef[];
/** Translated pointer data for each loaded scene */
data: PointWithinSceneData[];
}

@@ -321,2 +319,12 @@

/** Point within a scene coupled with the scene identifier and intersected defs */
export declare interface PointWithinSceneData {
/** Point in SVG/model coordinates. */
point: Vector2Like;
/** Identifier of the scene that contains the point. Undefined in case of default scene. */
sceneId?: string;
/** Intersected defs */
defs: RenderableDef[];
}
/** Polygon shape instance. */

@@ -373,2 +381,10 @@ export declare class Polygon {

/** Data for ptScale events */
export declare interface PtScaleEventData {
/** Scene identifier, undefined for default scene */
sceneId?: string;
/** Pixel to SVG scale factor */
ptScale: number;
}
/** Rectangle shape instance. */

@@ -440,15 +456,16 @@ export declare class Rect {

private gl?;
private ctx;
private clock;
private renderer;
private memoryInfoExtension;
private memoryInfo?;
private eventSystem;
private layerSystem;
private viewportSystem;
private updatesSystem;
private interactionsSystem;
private controlsSystem;
private controlsSystem?;
private controlsAPI?;
private eventsAPI?;
private viewportAPI?;
private clock;
private renderer;
private visibleRectValue?;
private memoryInfoExtension;
private memoryInfo?;
private initialized;

@@ -462,2 +479,6 @@ private disposed;

/**
* {@link EventsAPI} instance for subscribing to internal events
*/
get events(): EventsAPI;
/**
* {@link ControlsAPI} instance for controlling the viewport

@@ -467,15 +488,14 @@ */

/**
* {@link EventsAPI} instance for subscribing to internal events
* {@link ViewportAPI} instance for view transforms and coordinate conversion.
*/
get events(): EventsAPI;
/**
* {@link ViewportAPI} instance for view transforms and external transforms.
*/
get viewport(): ViewportAPI;
/**
* Optional sub-rectangle of the viewport that is used for positioning scene's viewbox
* Optional CSS-pixel sub-rectangle of the viewport used for positioning the scene's viewbox.
*/
get visibleRect(): Rect | undefined;
/**
* Optional sub-rectangle of the viewport that is used for positioning scene's viewbox
* Sets the CSS-pixel visible sub-rectangle.
* Triggers a viewport transform recompute (and schedules a redraw) only if the renderer
* is already initialized and not disposed; otherwise the value is stored and applied on the
* next {@link init} or {@link addScene} call.
*/

@@ -492,3 +512,4 @@ set visibleRect(rect: Rect);

* rendering, and will not automatically compute scene and camera transformations. Clients are responsible for setting
* the matrices manually by using {@link Renderer.viewport} methods.
* the transform matrix manually by using {@link SceneDef.staticTransform} and passing camera projection matrix
* to {@link render} as an optional argument.
*/

@@ -509,4 +530,10 @@ get isExternalMode(): boolean;

*/
init(sceneDef: SceneDef): void;
init(sceneDef?: SceneDef): void;
/**
* Add a scene to the renderer. Note that this method is untested in internal mode. Use {@link Renderer.init} instead.
* @param sceneDef {@link SceneDef} to render
* @param sceneId identifier of the scene (map key)
*/
addScene(sceneDef: SceneDef, sceneId: string): void;
/**
* Start the rendering loop

@@ -516,3 +543,5 @@ */

/**
* Update the given defs to make them reflect the current state
* Update the given defs to make them reflect the current state.
* Defs are queued for processing and will be applied during the next render frame,
* with frustum culling deferring off-screen text and image updates.
* @param defs {@link RenderableDef} array to update

@@ -523,4 +552,5 @@ */

* Render a single frame
* @param cameraProjection optional camera projection matrix. Ignored in internal mode, required in external mode.
*/
render(): void;
render(cameraProjection?: number[]): void;
/**

@@ -536,12 +566,9 @@ * Stop the rendering loop

dispose(): void;
private initScene;
private resizeCanvasToDisplaySize;
private updateMemoryInfo;
private createRendererContext;
private onContextLost;
private onContextRestored;
private initStatsContext;
private assertNotDisposed;
private assertInitialized;
private assertNotInitialized;
private assertNotExternalMode;
private assertExternalMode;
private updateMemoryInfo;
}

@@ -591,2 +618,4 @@

memoryLimit?: number;
/** Static transform matrix */
staticTransform?: number[];
}

@@ -678,16 +707,9 @@

* @param point point in canvas space (CSS pixels)
* @returns point in SVG coordinates or undefined if point is outside the SVG plane
* @returns Array of points in SVG coordinates of all loaded scenes
*/
canvasToSvg: (point: Vector2Like) => Vector2Like | undefined;
canvasToSvg: (point: Vector2Like) => {
point: Vector2Like;
sceneId?: string;
}[];
/**
* Set static part of an svg -> px transform matrix
* @param staticTransformMatrix static transform matrix to apply to the scene
*/
setStaticTransform: (staticTransformMatrix: number[]) => void;
/**
* Set dynamic part of an svg -> px transform matrix. Should be called every frame.
* @param dynamicTransformMatrix dynamic transform matrix (changes every frame)
*/
setDynamicTransform: (dynamicTransformMatrix: number[]) => void;
/**
* Set the maximum zoom factor. Default is 35.

@@ -694,0 +716,0 @@ * @param maxZoom Maximum zoom factor

{
"name": "@expofp/renderer",
"version": "2.3.2",
"version": "3.0.0",
"type": "module",

@@ -5,0 +5,0 @@ "files": [

Sorry, the diff of this file is too big to display