File size: 2,188 Bytes
33223d3
 
 
 
 
 
6defef8
33223d3
6defef8
 
33223d3
6defef8
 
 
 
 
 
 
 
33223d3
6defef8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33223d3
 
6defef8
 
33223d3
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<!DOCTYPE html>
<html>
<head>
    <title>GameFriends Engine</title>
    <link rel="stylesheet" href="style.css">
</head>
<body style="display: flex; margin: 0; overflow: hidden;">
    <div id="editor-sidebar">
        <h2>GameFriends</h2>
        <button class="play-btn" onclick="togglePlayMode()">▶ INICIAR JOGO</button>
        <hr>
        
        <div id="inspector">
            <p><b>Hierarquia</b></p>
            <button onclick="addBox()">📦 Cubo</button>
            <button onclick="addSphere()">🔮 Esfera</button>
            <label class="upload-btn">
                📂 Importar GLB <input type="file" id="glb-upload" accept=".glb" style="display:none">
            </label>

            <div id="object-settings" style="display:none; margin-top: 20px; border-top: 1px solid #444; padding-top: 10px;">
                <p><b>Propriedades</b></p>
                <label>Posição X: <input type="number" id="posX" step="0.1" oninput="updateObject()"></label>
                <label>Altura (Y): <input type="number" id="posY" step="0.1" oninput="updateObject()"></label>
                <label>Posição Z: <input type="number" id="posZ" step="0.1" oninput="updateObject()"></label>
                <hr>
                <label>Largura: <input type="number" id="scaleX" step="0.1" value="1" oninput="updateObject()"></label>
                <label>Altura: <input type="number" id="scaleY" step="0.1" value="1" oninput="updateObject()"></label>
                <hr>
                <label>Textura (Imagem):</label>
                <input type="file" id="tex-upload" accept="image/*" onchange="applyTexture(this)">
            </div>
        </div>

        <div style="position: absolute; bottom: 20px; width: 240px;">
            <input type="text" id="world-name" placeholder="Nome do Mundo...">
            <button class="save-btn" onclick="saveWorld()">💾 Publicar</button>
        </div>
    </div>

    <div id="game-container" style="flex-grow: 1;"></div>

    <script type="importmap">
        { "imports": { "three": "https://unpkg.com/three@0.160.0/build/three.module.js" } }
    </script>
    <script type="module" src="engine.js"></script>
</body>
</html>