测试开源率脚本添加

This commit is contained in:
Hector 2025-10-29 11:40:23 +08:00
parent 3a2ef35a88
commit 4e5f4dc35c
2 changed files with 1 additions and 107 deletions

View File

@ -321,7 +321,7 @@ def main():
# 步骤3: 执行ScanCode扫描许可证
print("\n步骤3: 执行ScanCode扫描许可证")
scancode_cmd = "scancode --license --classify --summary --json-pp summary.json . --ignore \"venv\" --ignore \".git\" --ignore \"__pycache__\" --ignore \".idea\" --ignore \".vscode\" --ignore \"build\" --ignore \"dist\" --ignore \"*.egg-info\" --ignore \"Resources/animations\" --ignore \"Resources/materials\" --ignore \"Resources/models\" --ignore \"Resources/textures\" --ignore \"icons\" --ignore \"tex\" --ignore \"cloc.json\" --ignore \"detailed_cloc.txt\" --ignore \"完整开源率分析报告.txt\" --ignore \"run_complete_analysis.py\""
scancode_cmd = "scancode --license --classify --summary --json-pp summary.json . --ignore \"venv\" --ignore \".git\" --ignore \"__pycache__\" --ignore \".idea\" --ignore \".vscode\" --ignore \"build\" --ignore \"dist\" --ignore \"*.egg-info\" --ignore \"Resources\" --ignore \"icons\" --ignore \"tex\" --ignore \"cloc.json\" --ignore \"detailed_cloc.txt\" --ignore \"完整开源率分析报告.txt\" --ignore \"run_complete_analysis.py\""
# 忽略失败因为ScanCode会尝试扫描自己生成的summary.json文件导致"失败"
run_command(scancode_cmd, ignore_failure=True)

View File

@ -1,106 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Three.js Panel</title>
<style>
body {
margin: 0;
padding: 10px;
background: rgba(0,0,0,0.7);
color: white;
font-family: Arial, sans-serif;
}
#info {
position: absolute;
top: 10px;
left: 10px;
z-index: 100;
}
#canvas-container {
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<div id="info">
<h3>场景信息面板</h3>
<p>FPS: <span id="fps">0</span></p>
<p>对象数: <span id="object-count">0</span></p>
</div>
<div id="canvas-container"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
<script>
// 初始化Three.js场景
let scene, camera, renderer;
let cube;
function init() {
// 创建场景
scene = new THREE.Scene();
// 创建相机
camera = new THREE.PerspectiveCamera(75,
document.getElementById('canvas-container').offsetWidth /
document.getElementById('canvas-container').offsetHeight,
0.1, 1000);
// 创建渲染器
renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true });
renderer.setSize(
document.getElementById('canvas-container').offsetWidth,
document.getElementById('canvas-container').offsetHeight
);
document.getElementById('canvas-container').appendChild(renderer.domElement);
// 添加一个立方体
const geometry = new THREE.BoxGeometry();
const material = new THREE.MeshBasicMaterial({
color: 0x00ff00,
wireframe: true
});
cube = new THREE.Mesh(geometry, material);
scene.add(cube);
camera.position.z = 5;
// 开始动画循环
animate();
// 监听窗口大小变化
window.addEventListener('resize', onWindowResize, false);
}
function onWindowResize() {
camera.aspect = document.getElementById('canvas-container').offsetWidth /
document.getElementById('canvas-container').offsetHeight;
camera.updateProjectionMatrix();
renderer.setSize(
document.getElementById('canvas-container').offsetWidth,
document.getElementById('canvas-container').offsetHeight
);
}
function animate() {
requestAnimationFrame(animate);
// 旋转立方体
cube.rotation.x += 0.01;
cube.rotation.y += 0.01;
renderer.render(scene, camera);
}
// 接收来自Python的消息
function updateInfo(data) {
document.getElementById('fps').textContent = data.fps || 0;
document.getElementById('object-count').textContent = data.objectCount || 0;
}
// 页面加载完成后初始化
window.onload = init;
</script>
</body>
</html>