Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
add xspace-agent/packages/server/public/js/components/audio-meter.js
oversteppingf93273cb992a
diff --git a/xspace-agent/packages/server/public/js/components/audio-meter.js b/xspace-agent/packages/server/public/js/components/audio-meter.jsnew file mode 100644index 000000000..1c5f3d626--- /dev/null+++ b/xspace-agent/packages/server/public/js/components/audio-meter.js@@ -0,0 +1,47 @@+// SPDX-License-Identifier: Apache-2.0+// Copyright 2026 nirholas (https://github.com/nirholas/xspace-agent) [§67]++// audio-meter.js — Real-time audio level visualization++export class AudioMeter {+ constructor(fillEl) {+ this.fillEl = fillEl+ this.currentLevel = 0+ this.targetLevel = 0+ this.animating = false+ }++ setLevel(level) {+ // level: 0-1+ this.targetLevel = Math.max(0, Math.min(1, level))+ if (!this.animating) {+ this.animating = true+ this._animate()+ }+ }++ _animate() {+ const diff = this.targetLevel - this.currentLevel+ this.currentLevel += diff * 0.3++ if (Math.abs(diff) < 0.001) {+ this.currentLevel = this.targetLevel+ this.animating = false+ }++ this.fillEl.style.width = (this.currentLevel * 100) + '%'++ if (this.animating) {+ requestAnimationFrame(() => this._animate())+ }+ }++ reset() {+ this.targetLevel = 0+ this.currentLevel = 0+ this.fillEl.style.width = '0%'+ this.animating = false+ }+}++