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.

26 lines 925 B
import { isLocalNetwork } from "../engine_networking_utils.js"; import { getParam } from "../engine_utils.js"; const noDevLogs = getParam("nodevlogs"); let _manuallySetDevEnvironment; let _cachedDevEnvironment; /** True when the application runs on a local url */ export function isDevEnvironment() { if (noDevLogs) return false; if (_manuallySetDevEnvironment !== undefined) return _manuallySetDevEnvironment; if (_cachedDevEnvironment !== undefined) return _cachedDevEnvironment; let res = isLocalNetwork(); if (!res) { // is stackblitz? res = window.location.hostname.endsWith(".local-credentialless.webcontainer.io"); } _cachedDevEnvironment = res; return res; } /** Enforce the dev environment flag to be true or false */ export function setDevEnvironment(val) { _manuallySetDevEnvironment = val; } //# sourceMappingURL=debug_environment.js.map