UNPKG

@needle-tools/engine

Version:

Needle Engine is a web-based runtime for 3D apps. It runs on your machine for development with great integrations into editors like Unity or Blender - and can be deployed onto any device! It is flexible, extensible and networking and XR are built-in.

13 lines (10 loc) 392 B
import type { KeyCode } from "../engine/engine_input.js"; import { Behaviour } from "../engine-components/Component.js"; export class PresentationMode extends Behaviour { toggleKey: KeyCode = "KeyP"; update(): void { if (this.context.input.isKeyDown(this.toggleKey)) { this.context.domElement.classList.toggle("presentation-mode"); } } }