@blocksuite/phasor
Advanced tools
Comparing version 0.3.1 to 0.4.0-alpha.0
@@ -1,3 +0,3 @@ | ||
export declare const MIN_ZOOM = 0.2; | ||
export declare const GRID_SIZE = 1000; | ||
export declare const MIN_ZOOM = 0.3; | ||
export declare const GRID_SIZE = 3000; | ||
export interface Bound { | ||
@@ -4,0 +4,0 @@ x: number; |
@@ -1,3 +0,3 @@ | ||
export const MIN_ZOOM = 0.2; | ||
export const GRID_SIZE = 1000; | ||
export const MIN_ZOOM = 0.3; | ||
export const GRID_SIZE = 3000; | ||
//# sourceMappingURL=consts.js.map |
export { Renderer } from './renderer.js'; | ||
export { type Model, PathModel, ImageModel } from './models.js'; | ||
export * from './models.js'; | ||
export * from './debug-utils.js'; | ||
//# sourceMappingURL=index.d.ts.map |
export { Renderer } from './renderer.js'; | ||
export { PathModel, ImageModel } from './models.js'; | ||
export * from './models.js'; | ||
export * from './debug-utils.js'; | ||
//# sourceMappingURL=index.js.map |
@@ -21,10 +21,10 @@ declare abstract class BaseModel { | ||
} | ||
export declare class ImageModel extends BaseModel { | ||
export declare class RectModel extends BaseModel { | ||
type: string; | ||
index: number; | ||
constructor(id: number, index: number); | ||
color: string; | ||
constructor(id: number); | ||
render(ctx: CanvasRenderingContext2D): void; | ||
} | ||
export type Model = PathModel | ImageModel; | ||
export type Model = PathModel | RectModel; | ||
export {}; | ||
//# sourceMappingURL=models.d.ts.map |
@@ -47,13 +47,13 @@ const BLACK = '#000000'; | ||
} | ||
export class ImageModel extends BaseModel { | ||
constructor(id, index) { | ||
export class RectModel extends BaseModel { | ||
constructor(id) { | ||
super(id); | ||
this.type = TYPE_IMAGE; | ||
this.index = index; | ||
this.color = BLACK; | ||
} | ||
render(ctx) { | ||
ctx.strokeStyle = this.color; | ||
ctx.strokeRect(0, 0, this.w, this.h); | ||
// ctx.drawImage(bitmap, 0, 0, this.w, this.h); | ||
} | ||
} | ||
//# sourceMappingURL=models.js.map |
{ | ||
"name": "@blocksuite/phasor", | ||
"version": "0.3.1", | ||
"version": "0.4.0-alpha.0", | ||
"description": "Hybrid canvas renderer.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -1,3 +0,3 @@ | ||
export const MIN_ZOOM = 0.2; | ||
export const GRID_SIZE = 1000; | ||
export const MIN_ZOOM = 0.3; | ||
export const GRID_SIZE = 3000; | ||
@@ -4,0 +4,0 @@ export interface Bound { |
export { Renderer } from './renderer.js'; | ||
export { type Model, PathModel, ImageModel } from './models.js'; | ||
export * from './models.js'; | ||
export * from './debug-utils.js'; |
@@ -58,16 +58,15 @@ const BLACK = '#000000'; | ||
export class ImageModel extends BaseModel { | ||
export class RectModel extends BaseModel { | ||
type = TYPE_IMAGE; | ||
index: number; | ||
constructor(id: number, index: number) { | ||
color = BLACK; | ||
constructor(id: number) { | ||
super(id); | ||
this.index = index; | ||
} | ||
render(ctx: CanvasRenderingContext2D): void { | ||
ctx.strokeStyle = this.color; | ||
ctx.strokeRect(0, 0, this.w, this.h); | ||
// ctx.drawImage(bitmap, 0, 0, this.w, this.h); | ||
} | ||
} | ||
export type Model = PathModel | ImageModel; | ||
export type Model = PathModel | RectModel; |
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
40
827
1
8
73190