Spaces:
Running
Running
Delete index.html
Browse files- index.html +0 -226
index.html
DELETED
|
@@ -1,226 +0,0 @@
|
|
| 1 |
-
<!DOCTYPE html>
|
| 2 |
-
<html>
|
| 3 |
-
<head>
|
| 4 |
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
| 5 |
-
<title>ORVO EMPIRE FULL + APP OPENER STRICT</title>
|
| 6 |
-
<style>
|
| 7 |
-
body{margin:0;background:#000;color:#fff;font-family:monospace;overflow:hidden}
|
| 8 |
-
#left{position:absolute;left:0;top:0;width:42%;height:100vh;background:#000f;overflow:auto;padding:8px;z-index:20}
|
| 9 |
-
#right{position:absolute;right:0;top:0;width:58%;height:100vh}
|
| 10 |
-
input,textarea{width:96%;padding:7px;background:#111;color:#0f0;border:1px solid #444;margin:3px 0;font-size:11px}
|
| 11 |
-
button{width:100%;padding:9px;background:linear-gradient(90deg,silver,#fff);color:#000;font-weight:900;border:none;margin:3px 0;cursor:pointer;font-size:11px}
|
| 12 |
-
.app{width:100%;padding:10px;background:linear-gradient(90deg,#ff3399,#33ddff)!important;color:#fff!important;font-weight:900;border:2px solid #fff!important}
|
| 13 |
-
.msg{padding:5px;margin:4px 0;border-radius:5px;font-size:10px}
|
| 14 |
-
.user{background:#222;color:#fff}
|
| 15 |
-
.orvo{background:#111;border:1px solid silver;color:#0f0}
|
| 16 |
-
#log{color:#0f0;font-size:9px;height:60px;overflow:auto;background:#000;padding:3px}
|
| 17 |
-
</style>
|
| 18 |
-
<script type="importmap">{"imports":{"three":"https://unpkg.com/three@0.160.0/build/three.module.js","three/addons/":"https://unpkg.com/three@0.160.0/examples/jsm/"}}</script>
|
| 19 |
-
<link rel="manifest" id="manifest">
|
| 20 |
-
</head>
|
| 21 |
-
<body>
|
| 22 |
-
<div id="left">
|
| 23 |
-
<h3 style="margin:0;color:silver">ORVO FULL EMPIRE + APP OPENER STRICT</h3>
|
| 24 |
-
<div style="font-size:8px;color:#888">MODEL + TEXT + APP LINK + 4D + COSTUME + APP OPENER - BROWSER BASED RULE</div>
|
| 25 |
-
|
| 26 |
-
<textarea id="prompt" rows="2">Pink city 1000 buildings hotel bar showroom garage traffic signal auto rickshaw</textarea>
|
| 27 |
-
<input id="costume" placeholder="Costume .glb link (optional)">
|
| 28 |
-
<input id="backendUrl" value="http://localhost:8000">
|
| 29 |
-
|
| 30 |
-
<button onclick="BUILD_MODEL()">🏙️ MODEL MODE (3D City)</button>
|
| 31 |
-
<button onclick="CALL_BACKEND()">🔥 PYTHON BACKEND (Beast Code)</button>
|
| 32 |
-
|
| 33 |
-
<!-- APP OPENER - STRICT BROWSER BASED - ALL FEATURES YOU SAID -->
|
| 34 |
-
<div style="border:2px solid #ff3399;padding:6px;margin:6px 0;background:#110011">
|
| 35 |
-
<div style="font-size:11px;color:#ff3399;font-weight:900">🚀 APP OPENER - STRICT BROWSER RULE</div>
|
| 36 |
-
<div style="font-size:8px;color:#aaa">ORVO is browser based, so MUST open app from browser - GPT/Claude CAN'T</div>
|
| 37 |
-
<input id="appLink" placeholder="Paste app link to open">
|
| 38 |
-
<button class="app" onclick="OPENER_OPEN_LINK()">📱 OPEN APP LINK (Browser App Opener)</button>
|
| 39 |
-
<button class="app" onclick="OPENER_GODOT()">🎮 OPEN GODOT APP (Browser Intent)</button>
|
| 40 |
-
<button class="app" onclick="OPENER_AUTU()">🛺 OPEN AUTU APK (Browser Intent)</button>
|
| 41 |
-
<button class="app" onclick="OPENER_INSTALL()">⬇️ INSTALL ORVO AS REAL APP (PWA)</button>
|
| 42 |
-
<button class="app" onclick="OPENER_SETTINGS()">⚙️ OPEN PHONE SETTINGS (Browser)</button>
|
| 43 |
-
<button class="app" onclick="OPENER_ALL()">📂 OPEN ALL ORVO APPS LIST</button>
|
| 44 |
-
</div>
|
| 45 |
-
|
| 46 |
-
<button onclick="CREATE_APP_LINK()">🌐 APP CREATE MODE (Publishable Link)</button>
|
| 47 |
-
<button onclick="EXPORT_GODOT_FILE()">📦 EXPORT GODOT FILE</button>
|
| 48 |
-
|
| 49 |
-
<div style="border-top:1px solid #333;margin-top:5px">
|
| 50 |
-
<input id="chatInp" placeholder="Ask text beast: white bug, beat gpt, open app" onkeydown="if(event.key=='Enter') ASK_TEXT()">
|
| 51 |
-
<button onclick="ASK_TEXT()">💬 TEXT BEAST MODE (No API)</button>
|
| 52 |
-
<div id="chatBox" style="height:110px;overflow:auto"></div>
|
| 53 |
-
</div>
|
| 54 |
-
|
| 55 |
-
<div id="log">>> FULL EMPIRE + APP OPENER STRICT LOADED</div>
|
| 56 |
-
<pre id="godotCode" style="background:#111;color:#0f0;font-size:8px;max-height:90px;overflow:auto"></pre>
|
| 57 |
-
</div>
|
| 58 |
-
<div id="right"></div>
|
| 59 |
-
|
| 60 |
-
<script type="module">
|
| 61 |
-
import * as THREE from 'three';
|
| 62 |
-
import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
|
| 63 |
-
let scene,camera,renderer,group;
|
| 64 |
-
init3D();
|
| 65 |
-
function init3D(){
|
| 66 |
-
scene=new THREE.Scene(); scene.background=new THREE.Color(0x110011);
|
| 67 |
-
camera=new THREE.PerspectiveCamera(60, innerWidth/innerHeight*0.58, 0.1, 1000);
|
| 68 |
-
camera.position.set(40,50,100);
|
| 69 |
-
renderer=new THREE.WebGLRenderer({antialias:false});
|
| 70 |
-
renderer.setSize(innerWidth*0.58, innerHeight);
|
| 71 |
-
document.getElementById('right').appendChild(renderer.domElement);
|
| 72 |
-
group=new THREE.Group(); scene.add(group);
|
| 73 |
-
scene.add(new THREE.DirectionalLight(0xffffff,2));
|
| 74 |
-
scene.add(new THREE.AmbientLight(0xff88cc,0.6));
|
| 75 |
-
animate();
|
| 76 |
-
}
|
| 77 |
-
function animate(){ requestAnimationFrame(animate); if(group) group.rotation.y+=0.001; renderer.render(scene,camera); }
|
| 78 |
-
function log(m){ const el=document.getElementById('log'); el.innerHTML+=`<br>>> ${m}`; el.scrollTop=9999; }
|
| 79 |
-
function addChat(t,c){ const d=document.createElement('div'); d.className='msg '+c; d.innerText=t; document.getElementById('chatBox').appendChild(d); document.getElementById('chatBox').scrollTop=9999; }
|
| 80 |
-
|
| 81 |
-
// ===== MODEL MODE (3D) - YOU SAID =====
|
| 82 |
-
window.BUILD_MODEL=()=>{
|
| 83 |
-
group.clear();
|
| 84 |
-
const prompt=document.getElementById('prompt').value;
|
| 85 |
-
let count=prompt.includes('1000')?200:100; if(innerWidth<600) count=70;
|
| 86 |
-
log(`MODEL MODE: ${count} buildings + costume + 4D`);
|
| 87 |
-
for(let i=0;i<count;i++){
|
| 88 |
-
const h=Math.random()*25+5; const geo=new THREE.BoxGeometry(5,h,5);
|
| 89 |
-
const mat=new THREE.MeshLambertMaterial({color:[0xf5d0a0,0xff3399,0x33ddff,0x888888][i%4]});
|
| 90 |
-
const m=new THREE.Mesh(geo,mat); let x=(Math.random()-0.5)*280, z=(Math.random()-0.5)*280; if(Math.abs(x)<10) x+=15;
|
| 91 |
-
m.position.set(x,h/2,z); m.scale.set(0,0,0); let s=0; (function g(mm){ s+=0.07; mm.scale.set(s,s,s); if(s<1) requestAnimationFrame(()=>g(mm)); })(m);
|
| 92 |
-
group.add(m);
|
| 93 |
-
}
|
| 94 |
-
// COSTUME LINK - YOU SAID
|
| 95 |
-
const costume=document.getElementById('costume').value;
|
| 96 |
-
if(costume){ new GLTFLoader().load(costume, g=>{ g.scene.scale.set(3,3,3); group.add(g.scene); log("COSTUME LINK LOADED"); }); }
|
| 97 |
-
// 4D TRAFFIC - YOU SAID
|
| 98 |
-
const tl=new THREE.Mesh(new THREE.CylinderGeometry(0.3,0.3,8), new THREE.MeshBasicMaterial({color:0xff0000}));
|
| 99 |
-
tl.position.set(8,4,0); group.add(tl); let cs=[0xff0000,0xffff00,0x00ff00], ci=0; setInterval(()=>{ ci=(ci+1)%3; tl.material.color.setHex(cs[ci]); },2000);
|
| 100 |
-
log(`MODEL MODE DONE: ${count} buildings + costume + 4D traffic`);
|
| 101 |
-
}
|
| 102 |
-
|
| 103 |
-
// ===== BACKEND CALL =====
|
| 104 |
-
window.CALL_BACKEND=async()=>{
|
| 105 |
-
const backend=document.getElementById('backendUrl').value;
|
| 106 |
-
const prompt=document.getElementById('prompt').value;
|
| 107 |
-
const costume=document.getElementById('costume').value;
|
| 108 |
-
log(`CALLING BACKEND...`);
|
| 109 |
-
try{
|
| 110 |
-
const res=await fetch(`${backend}/generate_city?prompt=${encodeURIComponent(prompt)}&costume_link=${encodeURIComponent(costume)}&count=200`);
|
| 111 |
-
const data=await res.json(); document.getElementById('godotCode').innerText=data.godot_code;
|
| 112 |
-
document.getElementById('appLink').value=data.app_link;
|
| 113 |
-
log(`BACKEND BEAST: ${data.count} buildings + app link: ${data.app_link}`);
|
| 114 |
-
addChat(`BACKEND: ${data.app_link} ready + Godot code downloaded`, 'orvo');
|
| 115 |
-
const blob=new Blob([data.godot_code],{type:'text/plain'}); const a=document.createElement('a'); a.href=URL.createObjectURL(blob); a.download='orvo_backend_city.gd'; a.click();
|
| 116 |
-
}catch(e){ log("Start backend: uvicorn orvo_backend:app --host 0.0.0.0 --port 8000"); }
|
| 117 |
-
}
|
| 118 |
-
window.ASK_TEXT=async()=>{
|
| 119 |
-
const backend=document.getElementById('backendUrl').value;
|
| 120 |
-
const q=document.getElementById('chatInp').value; if(!q) return; addChat(q,'user'); document.getElementById('chatInp').value='';
|
| 121 |
-
try{ const res=await fetch(`${backend}/chat?question=${encodeURIComponent(q)}`); const data=await res.json(); addChat(data.answer,'orvo'); }
|
| 122 |
-
catch(e){ addChat("Frontend Text Beast: Use material_override for white bug, MultiMesh for lag, intent:// for app opener! Start backend for python beast!", 'orvo'); }
|
| 123 |
-
}
|
| 124 |
-
|
| 125 |
-
// ===== APP OPENER - STRICT BROWSER BASED - YOU SAID MUST OPEN APP =====
|
| 126 |
-
// RULE: ORVO is browser based, so MUST open app - GPT/Claude CAN'T - ORVO CAN
|
| 127 |
-
|
| 128 |
-
window.OPENER_OPEN_LINK=()=>{
|
| 129 |
-
const link=document.getElementById('appLink').value;
|
| 130 |
-
if(!link){ log("Paste app link first!"); return; }
|
| 131 |
-
log(`APP OPENER STRICT: Opening ${link} from browser...`);
|
| 132 |
-
// BROWSER BASED: Open as standalone app window (like real app)
|
| 133 |
-
const win = window.open(link, '_blank', 'popup,width=400,height=800');
|
| 134 |
-
if(win){ log("APP OPENED as standalone window - Like real app!"); addChat(`OPENED: ${link} as app window!`, 'orvo'); }
|
| 135 |
-
else{ window.location.href = link; } // Fallback
|
| 136 |
-
}
|
| 137 |
-
|
| 138 |
-
window.OPENER_GODOT=async()=>{
|
| 139 |
-
const backend=document.getElementById('backendUrl').value;
|
| 140 |
-
log("APP OPENER STRICT: Opening Godot from browser...");
|
| 141 |
-
try{
|
| 142 |
-
// Call backend to get intent URL (browser based rule)
|
| 143 |
-
const res=await fetch(`${backend}/open_app?app=godot`);
|
| 144 |
-
const data=await res.json();
|
| 145 |
-
log(`Intent URL: ${data.intent_url}`);
|
| 146 |
-
// BROWSER BASED OPEN
|
| 147 |
-
window.location.href = data.intent_url;
|
| 148 |
-
setTimeout(()=>{
|
| 149 |
-
log("Godot not installed, opening web editor (fallback)");
|
| 150 |
-
window.open(data.fallback_url, '_blank');
|
| 151 |
-
}, 1500);
|
| 152 |
-
}catch(e){
|
| 153 |
-
// Direct browser intent without backend
|
| 154 |
-
window.location.href = "intent://#Intent;package=org.godotengine.godot;end";
|
| 155 |
-
setTimeout(()=>window.open("https://editor.godotengine.org","_blank"), 1200);
|
| 156 |
-
}
|
| 157 |
-
}
|
| 158 |
-
|
| 159 |
-
window.OPENER_AUTU=async()=>{
|
| 160 |
-
const backend=document.getElementById('backendUrl').value;
|
| 161 |
-
log("APP OPENER STRICT: Opening AUTU APK from browser...");
|
| 162 |
-
try{
|
| 163 |
-
const res=await fetch(`${backend}/open_app?app=autu`);
|
| 164 |
-
const data=await res.json();
|
| 165 |
-
window.location.href = data.intent_url;
|
| 166 |
-
setTimeout(()=>{ log("AUTU not installed, opening tiiny.host to build"); }, 1500);
|
| 167 |
-
}catch(e){
|
| 168 |
-
window.location.href = "intent://#Intent;package=com.orvo.autu;end";
|
| 169 |
-
}
|
| 170 |
-
}
|
| 171 |
-
|
| 172 |
-
window.OPENER_INSTALL=()=>{
|
| 173 |
-
log("APP OPENER STRICT: Installing ORVO as real app from browser...");
|
| 174 |
-
// BROWSER BASED PWA INSTALL - Makes ORVO real app icon
|
| 175 |
-
const manifest = {
|
| 176 |
-
"name": "ORVO EMPIRE - APP OPENER BEAST",
|
| 177 |
-
"short_name": "ORVO",
|
| 178 |
-
"start_url": ".",
|
| 179 |
-
"display": "standalone",
|
| 180 |
-
"background_color": "#000000",
|
| 181 |
-
"theme_color": "#ff3399",
|
| 182 |
-
"icons": [{"src": "https://cdn-icons-png.flaticon.com/512/888/888879.png", "sizes": "512x512", "type": "image/png"}]
|
| 183 |
-
};
|
| 184 |
-
const blob = new Blob([JSON.stringify(manifest)], {type:'application/json'});
|
| 185 |
-
const manifestURL = URL.createObjectURL(blob);
|
| 186 |
-
document.getElementById('manifest').href = manifestURL;
|
| 187 |
-
|
| 188 |
-
// Trigger install
|
| 189 |
-
if(window.deferredPrompt){ window.deferredPrompt.prompt(); log("Install prompt shown!"); }
|
| 190 |
-
else{ log("Chrome Menu > Add to Home Screen > ORVO becomes real app! STRICT RULE DONE!"); }
|
| 191 |
-
|
| 192 |
-
addChat("APP OPENER: ORVO installed as real app! Now ORVO opens like APK from home screen! This is STRICT browser based app opener - beats GPT/Claude!", 'orvo');
|
| 193 |
-
}
|
| 194 |
-
|
| 195 |
-
window.OPENER_SETTINGS=()=>{
|
| 196 |
-
log("APP OPENER STRICT: Opening phone settings from browser...");
|
| 197 |
-
window.location.href = "intent://#Intent;action=android.settings.SETTINGS;end";
|
| 198 |
-
setTimeout(()=>log("If settings not opened, browser security blocked - but ORVO tried!"), 1000);
|
| 199 |
-
}
|
| 200 |
-
|
| 201 |
-
window.OPENER_ALL=()=>{
|
| 202 |
-
const link=document.getElementById('appLink').value || "https://orvo-empire.hf.space";
|
| 203 |
-
const backend=document.getElementById('backendUrl').value;
|
| 204 |
-
addChat(`ORVO APPS LIST (All openable from browser):\n1. ORVO City App: ${link}\n2. Godot: intent:// org.godotengine.godot\n3. AUTU APK: intent:// com.orvo.autu\n4. Backend: ${backend}\n5. Settings: android.settings.SETTINGS\n\nAll via APP OPENER STRICT - Browser based!`, 'orvo');
|
| 205 |
-
log("APP LIST SHOWN - All openable from browser!");
|
| 206 |
-
}
|
| 207 |
-
|
| 208 |
-
window.CREATE_APP_LINK=()=>{
|
| 209 |
-
const code=document.documentElement.outerHTML;
|
| 210 |
-
const blob=new Blob([code],{type:'text/html'}); const a=document.createElement('a'); a.href=URL.createObjectURL(blob); a.download='orvo-full-empire-app-opener.html'; a.click();
|
| 211 |
-
log("APP CREATE MODE: File downloaded! Upload to tiiny.host = publishable link!");
|
| 212 |
-
}
|
| 213 |
-
|
| 214 |
-
window.EXPORT_GODOT_FILE=()=>{
|
| 215 |
-
const code=document.getElementById('godotCode').innerText || "// Call backend first!";
|
| 216 |
-
const blob=new Blob([code],{type:'text/plain'}); const a=document.createElement('a'); a.href=URL.createObjectURL(blob); a.download='orvo_city.gd'; a.click();
|
| 217 |
-
log("GODOT EXPORTED");
|
| 218 |
-
}
|
| 219 |
-
|
| 220 |
-
let deferredPrompt;
|
| 221 |
-
window.addEventListener('beforeinstallprompt', (e)=>{ e.preventDefault(); deferredPrompt=e; window.deferredPrompt=e; log("PWA Install ready! Click INSTALL AS REAL APP"); });
|
| 222 |
-
|
| 223 |
-
addChat("FULL EMPIRE READY: Model + Text + App Link + Costume + 4D + App Opener STRICT (Browser Based) - All features you said!", 'orvo');
|
| 224 |
-
</script>
|
| 225 |
-
</body>
|
| 226 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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