engine.common.d.ts 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. import type { Nullable } from "../types";
  2. import { AbstractEngine } from "./abstractEngine";
  3. import type { AbstractEngineOptions } from "./abstractEngine";
  4. /** @internal */
  5. export declare function _CommonInit(commonEngine: AbstractEngine, canvas: HTMLCanvasElement, creationOptions: AbstractEngineOptions): void;
  6. /** @internal */
  7. export declare function _CommonDispose(commonEngine: AbstractEngine, canvas: Nullable<HTMLCanvasElement>): void;
  8. /**
  9. * Get Font size information
  10. * @param font font name
  11. * @returns an object containing ascent, height and descent
  12. */
  13. export declare function GetFontOffset(font: string): {
  14. ascent: number;
  15. height: number;
  16. descent: number;
  17. };
  18. /** @internal */
  19. export declare function CreateImageBitmapFromSource(engine: AbstractEngine, imageSource: string, options?: ImageBitmapOptions): Promise<ImageBitmap>;
  20. /** @internal */
  21. export declare function ResizeImageBitmap(engine: AbstractEngine, image: HTMLImageElement | ImageBitmap, bufferWidth: number, bufferHeight: number): Uint8Array;
  22. /**
  23. * Ask the browser to promote the current element to fullscreen rendering mode
  24. * @param element defines the DOM element to promote
  25. */
  26. export declare function RequestFullscreen(element: HTMLElement): void;
  27. /**
  28. * Asks the browser to exit fullscreen mode
  29. */
  30. export declare function ExitFullscreen(): void;
  31. /**
  32. * Ask the browser to promote the current element to pointerlock mode
  33. * @param element defines the DOM element to promote
  34. */
  35. export declare function RequestPointerlock(element: HTMLElement): void;
  36. /**
  37. * Asks the browser to exit pointerlock mode
  38. */
  39. export declare function ExitPointerlock(): void;