Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

HtmlifyOptions

import type { HtmlifyOptions } from "https://raw.githubusercontent.com/SheepTester/htmlifier/v1.0.2/src/htmlifier.ts";

Options to customise the resulting converted HTML file.

interface HtmlifyOptions {
autoStart: boolean;
backgroundImage: File | null;
buttons: Partial<ButtonOptions>;
cloud: Partial<CloudOptions>;
cursor: File | "hidden" | null;
extensions: (string | File)[];
favicon: File | null;
fencing: boolean;
fps: number;
height: number;
includeVm: boolean;
injectedScripts: (string | File)[];
limits: boolean;
loading: Partial<LoadingOptions>;
log: Logger;
monitors: Partial<MonitorOptions>;
pointerLock: boolean;
stretch: boolean;
title: string;
turbo: boolean;
username: string;
width: number;
zip: boolean;
}

§Properties

§
autoStart: boolean
[src]

Whether to start the project automatically. Default: true.

§
backgroundImage: File | null
[src]

A File containing the background image.

§
buttons: Partial<ButtonOptions>
[src]

Customisation options for the buttons on the top right of the page.

§
cloud: Partial<CloudOptions>
[src]

Control the behaviour of cloud variables when HTMLified. Cloud variables are stored in localStorage by default.

§
cursor: File | "hidden" | null
[src]

A File containing an image to set the cursor to, or 'hidden' to hide the cursor, or null to use the default cursor.

§
extensions: (string | File)[]
[src]

List of URLs or JavaScript files containing the unofficial extensions that the project uses.

§
favicon: File | null
[src]

A File containing the favicon image.

§
fencing: boolean
[src]

Whether sprite fencing is enabled to prevent sprites from going off screen (on by default in vanilla Scratch). Default: true.

§
fps: number
[src]

FPS of the project. Default: 30.

§
height: number
[src]

Height of stage. Default: 360.

§
includeVm: boolean
[src]

Whether to include the VM inside the HTML file. Default: true

§
injectedScripts: (string | File)[]
[src]

List of URLs or JavaScript files to include in the resulting HTML file. In addition to having access to DOM APIs (as opposed to unofficial extensions, which are sandboxed in a Web Worker), the resulting HTML file also makes the following variables global:

  • vm has the instance of Scratch's VirtualMachine
  • setCloud(name, value) sets a cloud variable with the name name (including the ☁) to value

These injected scripts are equivalent to E羊icques "plugins," which are a euphemism for userscripts.

§
limits: boolean
[src]

Whether to enforce reasonable limits such as the maximum list length (on by default in vanilla Scratch). Default: true.

§
loading: Partial<LoadingOptions>
[src]

Customisation options for the loading screen.

§

Logging function to track the progress of HTMLification.

§
monitors: Partial<MonitorOptions>
[src]

Customisation of list and variable monitor colours.

§
pointerLock: boolean
[src]

Whether to lock the cursor when the user clicks on the stage. The mouse x/y blocks are set to the accumulative mouse position, so the limits option should be false to allow it to extend beyond the stage.

§
stretch: boolean
[src]

Whether the stage should be stretched to fill the screen.

§
title: string
[src]

The page title of the resulting HTML file.

§
turbo: boolean
[src]

Whether turbo mode is enabled.

§
username: string
[src]

The value of the username block; this can also be changed by setting ☁ username with special cloud behaviours enabled.

§
width: number
[src]

Width of stage. Default: 480.

§
zip: boolean
[src]

Whether to store the project.json, assets, and VM separately and bundle them all up in a .zip file.