@chocodrop/mcp 0.1.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +19 -0
- package/bin/chocodrop-mcp.js +13 -0
- package/package.json +42 -0
- package/runtime/.chocodrop-mcp-runtime +1 -0
- package/runtime/asset-bridge.js +460 -0
- package/runtime/mcp-server.js +107 -0
- package/runtime/site/examples/basic/README.md +38 -0
- package/runtime/site/examples/basic/index.html +1730 -0
- package/runtime/site/examples/bookmarklet-v2.html +141 -0
- package/runtime/site/examples/bookmarklet.html +126 -0
- package/runtime/site/examples/lofi-room/index.html +2570 -0
- package/runtime/site/examples/lofi-room/sandbox-lite.html +124 -0
- package/runtime/site/examples/music-garden/index.html +2150 -0
- package/runtime/site/examples/pixel-ocean/index.html +1780 -0
- package/runtime/site/examples/react-three-fiber/AdvancedExample.jsx +338 -0
- package/runtime/site/examples/react-three-fiber/App.jsx +97 -0
- package/runtime/site/examples/react-three-fiber/README.md +294 -0
- package/runtime/site/examples/react-three-fiber/package.json +25 -0
- package/runtime/site/examples/sdk-test/README.md +70 -0
- package/runtime/site/examples/space/index.html +1975 -0
- package/runtime/site/examples/toy-city/index.html +2288 -0
- package/runtime/site/examples/wabi-sabi/index.html +2515 -0
- package/runtime/site/getting-started.html +84 -0
- package/runtime/site/index.html +1370 -0
- package/runtime/site/public/CommandUI.js +6341 -0
- package/runtime/site/public/LiveCommandClient.js +432 -0
- package/runtime/site/public/SceneManager.js +5493 -0
- package/runtime/site/public/bookmarklet.js +206 -0
- package/runtime/site/public/bootstrap.js +50 -0
- package/runtime/site/public/chocodrop-demo.umd.js +24020 -0
- package/runtime/site/public/chocodrop-demo.umd.min.js +24020 -0
- package/runtime/site/public/chocodrop.esm.js +2 -0
- package/runtime/site/public/html-sandbox/frame.js +865 -0
- package/runtime/site/public/icons/icon-192.png +0 -0
- package/runtime/site/public/icons/icon-512.png +0 -0
- package/runtime/site/public/icons/icon-maskable-512.png +0 -0
- package/runtime/site/public/immersive-launcher.js +175 -0
- package/runtime/site/public/immersive.html +165 -0
- package/runtime/site/public/index.html +1011 -0
- package/runtime/site/public/index.js +9 -0
- package/runtime/site/public/load-chocodrop.js +25 -0
- package/runtime/site/public/load-three.js +26 -0
- package/runtime/site/public/manifest.webmanifest +59 -0
- package/runtime/site/public/pwa-bootstrap.js +128 -0
- package/runtime/site/public/sample-card.svg +15 -0
- package/runtime/site/public/service-worker.js +117 -0
- package/runtime/site/public/translation-dictionary.js +257 -0
- package/runtime/site/public/xr/xr-ui.css +338 -0
- package/runtime/site/public/xr-viewer.html +263 -0
- package/runtime/site/src/client/local-bridge.js +83 -0
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="ja">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>ChocoDrop Lo-fi Room Sandbox Lite</title>
|
|
7
|
+
<script type="importmap">
|
|
8
|
+
{
|
|
9
|
+
"imports": {
|
|
10
|
+
"three": "https://cdn.jsdelivr.net/npm/three@0.170.0/build/three.module.js",
|
|
11
|
+
"three/addons/": "https://cdn.jsdelivr.net/npm/three@0.170.0/examples/jsm/"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
</script>
|
|
15
|
+
<style>
|
|
16
|
+
:root { color-scheme: dark; }
|
|
17
|
+
body {
|
|
18
|
+
margin: 0;
|
|
19
|
+
background: radial-gradient(circle at 20% 20%, #1f2937, #0f172a 60%);
|
|
20
|
+
color: #e5e7eb;
|
|
21
|
+
font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
}
|
|
24
|
+
#info {
|
|
25
|
+
position: absolute;
|
|
26
|
+
top: 12px;
|
|
27
|
+
left: 12px;
|
|
28
|
+
padding: 10px 12px;
|
|
29
|
+
background: rgba(31, 41, 55, 0.8);
|
|
30
|
+
border: 1px solid rgba(148, 163, 184, 0.4);
|
|
31
|
+
border-radius: 10px;
|
|
32
|
+
font-size: 13px;
|
|
33
|
+
}
|
|
34
|
+
canvas { display: block; }
|
|
35
|
+
</style>
|
|
36
|
+
</head>
|
|
37
|
+
<body>
|
|
38
|
+
<div id="info">Sandbox Lite / three@0.170.0 / 外部リソースなし</div>
|
|
39
|
+
<script type="module">
|
|
40
|
+
import * as THREE from 'three';
|
|
41
|
+
import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
|
|
42
|
+
|
|
43
|
+
console.log('THREE loaded:', !!THREE?.Scene);
|
|
44
|
+
|
|
45
|
+
const scene = new THREE.Scene();
|
|
46
|
+
scene.background = new THREE.Color(0x0b1220);
|
|
47
|
+
|
|
48
|
+
const camera = new THREE.PerspectiveCamera(60, window.innerWidth / window.innerHeight, 0.1, 100);
|
|
49
|
+
camera.position.set(3.5, 2.4, 4.2);
|
|
50
|
+
|
|
51
|
+
const renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true });
|
|
52
|
+
renderer.setPixelRatio(window.devicePixelRatio);
|
|
53
|
+
renderer.setSize(window.innerWidth, window.innerHeight);
|
|
54
|
+
renderer.outputColorSpace = THREE.SRGBColorSpace;
|
|
55
|
+
document.body.appendChild(renderer.domElement);
|
|
56
|
+
|
|
57
|
+
const controls = new OrbitControls(camera, renderer.domElement);
|
|
58
|
+
controls.target.set(0, 1, 0);
|
|
59
|
+
controls.update();
|
|
60
|
+
|
|
61
|
+
// 簡易ルーム
|
|
62
|
+
const room = new THREE.Group();
|
|
63
|
+
const floorMat = new THREE.MeshStandardMaterial({ color: 0x1f2937, roughness: 0.8 });
|
|
64
|
+
const wallMat = new THREE.MeshStandardMaterial({ color: 0x111827, roughness: 0.9 });
|
|
65
|
+
const floor = new THREE.Mesh(new THREE.PlaneGeometry(8, 8), floorMat);
|
|
66
|
+
floor.rotation.x = -Math.PI / 2;
|
|
67
|
+
floor.position.y = 0;
|
|
68
|
+
room.add(floor);
|
|
69
|
+
const back = new THREE.Mesh(new THREE.PlaneGeometry(8, 4), wallMat);
|
|
70
|
+
back.position.set(0, 2, -4);
|
|
71
|
+
room.add(back);
|
|
72
|
+
const side = new THREE.Mesh(new THREE.PlaneGeometry(8, 4), wallMat);
|
|
73
|
+
side.rotation.y = Math.PI / 2;
|
|
74
|
+
side.position.set(-4, 2, 0);
|
|
75
|
+
room.add(side);
|
|
76
|
+
scene.add(room);
|
|
77
|
+
|
|
78
|
+
// 机 + スピーカー風オブジェクト
|
|
79
|
+
const table = new THREE.Mesh(new THREE.BoxGeometry(2.6, 0.12, 1.2), new THREE.MeshStandardMaterial({ color: 0x334155 }));
|
|
80
|
+
table.position.set(0, 0.6, -1.2);
|
|
81
|
+
scene.add(table);
|
|
82
|
+
|
|
83
|
+
const speakerGeo = new THREE.BoxGeometry(0.25, 0.6, 0.25);
|
|
84
|
+
const speakerMat = new THREE.MeshStandardMaterial({ color: 0x8b5cf6, emissive: 0x4c1d95, emissiveIntensity: 0.4 });
|
|
85
|
+
const spkL = new THREE.Mesh(speakerGeo, speakerMat.clone());
|
|
86
|
+
spkL.position.set(-0.8, 0.9, -1.1);
|
|
87
|
+
const spkR = spkL.clone();
|
|
88
|
+
spkR.position.x = 0.8;
|
|
89
|
+
scene.add(spkL, spkR);
|
|
90
|
+
|
|
91
|
+
// ランプ
|
|
92
|
+
const lamp = new THREE.PointLight(0x60a5fa, 1.4, 10);
|
|
93
|
+
lamp.position.set(1.5, 2.6, 1.5);
|
|
94
|
+
scene.add(lamp);
|
|
95
|
+
scene.add(new THREE.AmbientLight(0xffffff, 0.28));
|
|
96
|
+
|
|
97
|
+
// アニメーションするオーブ
|
|
98
|
+
const orbMat = new THREE.MeshStandardMaterial({ color: 0x22d3ee, emissive: 0x0ea5e9, emissiveIntensity: 0.8, roughness: 0.4 });
|
|
99
|
+
const orb = new THREE.Mesh(new THREE.SphereGeometry(0.35, 32, 32), orbMat);
|
|
100
|
+
orb.position.set(0, 1.4, 0.6);
|
|
101
|
+
scene.add(orb);
|
|
102
|
+
|
|
103
|
+
const clock = new THREE.Clock();
|
|
104
|
+
function animate() {
|
|
105
|
+
requestAnimationFrame(animate);
|
|
106
|
+
const t = clock.getElapsedTime();
|
|
107
|
+
orb.position.y = 1.4 + Math.sin(t * 1.5) * 0.1;
|
|
108
|
+
orb.rotation.y += 0.01;
|
|
109
|
+
controls.update();
|
|
110
|
+
renderer.render(scene, camera);
|
|
111
|
+
}
|
|
112
|
+
animate();
|
|
113
|
+
|
|
114
|
+
window.addEventListener('resize', () => {
|
|
115
|
+
camera.aspect = window.innerWidth / window.innerHeight;
|
|
116
|
+
camera.updateProjectionMatrix();
|
|
117
|
+
renderer.setSize(window.innerWidth, window.innerHeight);
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
// sandbox Runner が Scene を拾いやすいように、グローバルに参照を残す
|
|
121
|
+
window.scene = scene;
|
|
122
|
+
</script>
|
|
123
|
+
</body>
|
|
124
|
+
</html>
|