A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
API surface — esengine/image
Symbols: 0 public · 0 beta · 22 experimental · 0 deprecated
FlatFigure — interface @experimental
contour: Float32Array<ArrayBufferLike>
joints: Record<string, readonly [number, number]>
light: readonly [number, number, number]
lines: readonly (readonly (readonly [number, number])[])[]
mask: Float32Array<ArrayBufferLike>
normals: Float32Array<ArrayBufferLike>
parts: Record<string, Float32Array<ArrayBufferLike>>
IMAGE_RASTER_REVISION — const @experimental
"1"
IMAGE_SOURCE_EXT — const @experimental
".esimage"
IMAGE_SOURCE_VERSION — const @experimental
1
ImageLayer — interface @experimental
adjust: ImageAdjust | undefined
align: "center" | "left" | "right" | undefined
at: readonly [number, number] | undefined
blend: "add" | "color" | "colorBurn" | "colorDodge" | "darken" | "difference" | "divide" | "exclusion" | "hardLight" | "hue" | "lighten" | "linearBurn" | "linearLight" | "luminosity" | "multiply" | "normal" | "overlay" | "pinLight" | "saturation" | "screen" | "softLight" | "subtract" | "vividLight" | undefined
blendIf: readonly number[] | undefined
blur: number | undefined
build: { head?: number; shoulders?: number; chest?: number; waist?: number; hips?: number; limbs?: number; } | undefined
clip: string | undefined
clipFeather: number | undefined
clipGrow: number | undefined
clipInvert: boolean | undefined
count: number | undefined
d: string | undefined
depth: readonly number[] | undefined
dry: number | undefined
edge: readonly (readonly number[])[] | undefined
effects: readonly ImageEffect[] | undefined
erase: boolean | undefined
except: string | undefined
face: string | undefined
faces: readonly ImageFill[] | undefined
feather: number | undefined
fill: ImageFill | undefined
filter: "chromatic" | "displace" | "emboss" | "flare" | "fog" | "gaussian" | "highPass" | "lens" | "median" | "motion" | "noise" | "pixelate" | "rays" | "ripple" | "sharpen" | "spin" | "texture" | "twirl" | "vignette" | "zoom" | undefined
font: string | undefined
fontSize: number | undefined
from: "below" | undefined
grain: number | undefined
grainScale: number | undefined
guide: boolean | undefined
height: number | undefined
id: string | undefined
inner: number | undefined
layers: readonly ImageLayer[] | undefined
light: readonly number[] | undefined
mirror: "x" | "y" | undefined
opacity: number | undefined
palette: Readonly<Record<string, string>> | undefined
params: Readonly<Record<string, unknown>> | undefined
pitch: number | undefined
points: readonly (readonly [number, number])[] | undefined
pose: { rotate?: Readonly<Record<string, readonly number[]>>; move?: Readonly<Record<string, readonly number[]>>; reach?: Readonly<Record<string, { at: readonly number[]; pole?: readonly number[]; }>>; } | undefined
quad: readonly (readonly number[])[] | undefined
radii: readonly [number, number] | undefined
radius: number | readonly number[] | undefined
reach: number | undefined
ripple: number | undefined
roof: ImageFill | undefined
rows: readonly string[] | undefined
scale: number | undefined
shape: ImageShape
size: readonly [number, number] | undefined
smear: number | undefined
src: string | undefined
strength: number | undefined
stroke: { color: ImageFill; width: number; align?: "center" | "inside" | "outside"; join?: "bevel" | "miter" | "round"; cap?: "butt" | "round" | "square"; } | undefined
strokes: readonly ImageMark[] | undefined
text: string | undefined
thin: number | undefined
threshold: number | undefined
tooth: number | undefined
tracking: number | undefined
transform: ImageTransform | undefined
turn: number | undefined
vanish: readonly (readonly number[])[] | undefined
vertical: boolean | undefined
visible: boolean | undefined
weight: string | number | undefined
within: readonly number[] | undefined
y: number | undefined
yaw: number | undefined
ImageMapSource — interface @experimental
map: "normal" | "surface"
mapOf: string
version: number | undefined
ImageMaterial — interface @experimental
height: readonly ImageLayer[] | undefined
metal: number | readonly ImageLayer[] | undefined
relief: number | undefined
roughness: number | readonly ImageLayer[] | undefined
ImageSource — interface @experimental
background: string | undefined
layers: readonly ImageLayer[]
material: ImageMaterial | undefined
size: number | readonly [number, number]
tile: boolean | undefined
version: number | undefined
ImageTextDrawer — type @experimental
(layer: ImageLayer, m: readonly number[], w: number, h: number) => { fill: Float32Array; line: Float32Array | null }
MAX_IMAGE_SIZE — const @experimental
2048
MaterialMaps — interface @experimental
height: RgbaBitmap
metal: number
normal: RgbaBitmap
notes: string[]
roughness: number
surface: RgbaBitmap | null
RECIPE_MAPS — const @experimental
readonly ["normal", "surface"]
RecipeMap — type @experimental
(typeof RECIPE_MAPS)[number]
RenderedImage — interface @experimental
blocks: Record<string, Record<string, readonly (readonly number[])[]>>
bounds: ImageBox | null
covers: number
figures: Record<string, Record<string, readonly [number, number]>>
height: number
layerBounds: Record<string, ImageBox>
notes: string[]
painted: Record<string, { entries: number; strokes: number; }>
rgba: Uint8Array<ArrayBufferLike>
width: number
RgbaBitmap — interface @experimental
height: number
rgba: Uint8Array<ArrayBufferLike>
width: number
canvasTextDrawer — function @experimental
(canvas: (w: number, h: number) => TextCanvas, familyOf: (font: string) => string | undefined): ImageTextDrawer
installTextureRecipes — function @experimental
(): void
parseRecipe — function @experimental
(text: string): Recipe
recipeNeeds — function @experimental
(text: string): string[]
renderImage — function @experimental
(source: ImageSource, options?: { guides?: boolean; pictures?: Readonly<Record<string, RgbaBitmap>>; text?: ImageTextDrawer; }): RenderedImage
renderMaterialMaps — function @experimental
(source: ImageSource, color: RgbaBitmap, options?: DrawOptions): MaterialMaps
validateImageSource — function @experimental
(raw: unknown): ImageSource