@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.
28 lines (24 loc) • 1.26 kB
text/typescript
import { addLog, BalloonOptions, clearMessages, LogType, setAllowBalloonMessages, setAllowOverlayMessages } from "./debug_overlay.js";
export {
clearMessages as clearBalloonMessages,
/** @deprecated use clearBalloonMessages instead */
clearMessages as clearOverlayMessages,
LogType,
setAllowBalloonMessages,
// eslint-disable-next-line @typescript-eslint/no-deprecated
setAllowOverlayMessages,
};
export { isDevEnvironment, setDevEnvironment } from "./debug_environment.js";
export { enableSpatialConsole } from "./debug_spatial_console.js";
/** Displays a debug message on screen for a certain amount of time */
export function showBalloonMessage(text: string, options?: Partial<BalloonOptions>): void {
addLog(options?.type ?? LogType.Log, text, options);
}
/** Displays a warning message on screen for a certain amount of time */
export function showBalloonWarning(text: string, options?: Partial<BalloonOptions>): void {
showBalloonMessage(text, { ...options, type: LogType.Warn });
}
/** Displays an error message on screen for a certain amount of time */
export function showBalloonError(text: string, options?: Partial<BalloonOptions>): void {
showBalloonMessage(text, { ...options, type: LogType.Error });
}