🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@mml-io/mml-web-playcanvas-standalone

Package Overview
Dependencies
Maintainers
2
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mml-io/mml-web-playcanvas-standalone

latest
npmnpm
Version
0.23.0
Version published
Maintainers
2
Created
Source

MML Web PlayCanvas Standalone

@mml-io/mml-web-playcanvas-standalone

npm version

This package contains a class, StandalonePlayCanvasAdapter, that is a PlayCanvas-backed Graphics Adapter implementation for @mml-io/mml-web that creates:

  • A PlayCanvas App instance
    • with embedded DRACO, Ammo, glglang, and twgsl WASM bundles as base64 encoded strings (to avoid external dependencies at runtime)
  • Orbit and drag-fly controls
  • A factory for MML element graphics instances from the @mml-io/mml-web-playcanvas package.

It is intended to be used with the following packages:

  • @mml-io/mml-web
    • provides the MML element handling and parsing and can use this package as a Graphics Adapter.

Example Usage

import { FullScreenMMLScene } from "@mml-io/mml-web";
import {
  StandalonePlayCanvasAdapter, StandalonePlayCanvasAdapterControlsType,
} from "@mml-io/mml-web-playcanvas-standalone";

// ** This code is not a complete example. See @mml-io/mml-web for more info on how to use an MMLScene **

// Create an MML Scene that will act as the container for MML content
const fullScreenMMLScene = new FullScreenMMLScene<StandalonePlayCanvasAdapter>();
// Append the element of the MML scene to the page
document.body.append(fullScreenMMLScene.element);

// Provide the element for the renderer to the adapter to attach controls to
const graphicsAdapter = await StandalonePlayCanvasAdapter.create(fullScreenMMLScene.element, {
  controlsType: StandalonePlayCanvasAdapterControlsType.DragFly,
});

// Provide the Graphics Adapter to the MML Scene to use to render elements
fullScreenMMLScene.init(graphicsAdapter);

FAQs

Package last updated on 29 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts