mirror of https://gitee.com/cf-fz/WebCAD.git
pull/7/head
parent
60b2718349
commit
fe1bfbaa25
@ -0,0 +1,102 @@
|
||||
// let pts: THREE.Points
|
||||
// let selectPts: THREE.Points
|
||||
// function load()
|
||||
// {
|
||||
// //绘制直线
|
||||
// var line = new Line(new THREE.Vector3(0, 0, 0),
|
||||
// new THREE.Vector3(100, 100, 0)
|
||||
// );
|
||||
// db.appendEntity(line);
|
||||
// //绘制直线
|
||||
// var line2 = new Line(new THREE.Vector3(100, 0, 0),
|
||||
// new THREE.Vector3(0, 100, 0)
|
||||
// );
|
||||
// db.appendEntity(line2);
|
||||
|
||||
// // app.m_Viewer.m_bIsChange = true;
|
||||
// // //绘制方块
|
||||
// // var box = new Solid3d(3, 3, 3);
|
||||
// // db.appendEntity(box);
|
||||
|
||||
|
||||
// let geometry = new THREE.Geometry();
|
||||
// for (let i = 0; i < 10; i++)
|
||||
// {
|
||||
// var vertex = new THREE.Vector3();
|
||||
// vertex.x = i * 50;
|
||||
// vertex.y = 0;
|
||||
// vertex.z = 0
|
||||
// geometry.vertices.push(vertex);
|
||||
// }
|
||||
// let material = new THREE.PointsMaterial({
|
||||
// size: 15,
|
||||
// color: 0x001dfa,
|
||||
// sizeAttenuation: false
|
||||
|
||||
// });
|
||||
|
||||
// pts = new THREE.Points(geometry, material);
|
||||
|
||||
// pts.userData = app;
|
||||
|
||||
// let geo2 = new THREE.Geometry();
|
||||
// geo2.vertices.push(new THREE.Vector3())
|
||||
// let mat2 = new THREE.PointsMaterial({
|
||||
// size: 15,
|
||||
// color: 0xde9722,
|
||||
// sizeAttenuation: false
|
||||
// })
|
||||
// selectPts = new THREE.Points(geo2, mat2);
|
||||
|
||||
// app.m_Viewer.m_Scene.add(selectPts)
|
||||
|
||||
// app.m_Viewer.m_Scene.add(pts);
|
||||
|
||||
|
||||
// //绘制方块
|
||||
// var box = new Solid3d(300, 300, 300);
|
||||
// db.appendEntity(box);
|
||||
|
||||
|
||||
// ed.UpdateScreen()
|
||||
|
||||
// }
|
||||
|
||||
|
||||
// let raycaster = new THREE.Raycaster();
|
||||
// let lastIndex: number;
|
||||
|
||||
|
||||
// function loadTestPoints()
|
||||
// {
|
||||
|
||||
// }
|
||||
|
||||
// function loadTestSelectBox()
|
||||
// {
|
||||
// var baseColor = 0x333333;
|
||||
// var simpleMaterial = new THREE.MeshBasicMaterial();
|
||||
// simpleMaterial.color.setHex(baseColor);
|
||||
|
||||
// let box2 = new Solid3d(1, 1, 1);
|
||||
// (<THREE.Mesh>box2.m_ThreeObj).material = simpleMaterial;
|
||||
// let mat = new THREE.Matrix4()
|
||||
// mat.setPosition(new THREE.Vector3(50, 0, 0))
|
||||
// box2.applyMatrix4(mat)
|
||||
// db.appendEntity(box2)
|
||||
|
||||
|
||||
// for (var index = 0; index < 10000; index++)
|
||||
// {
|
||||
// var baseColor = 0x333333;
|
||||
// let simpleMaterial = new THREE.MeshBasicMaterial();
|
||||
// simpleMaterial.color.setHex(baseColor);
|
||||
|
||||
// let boxx = new Solid3d(1, 1, 1, )
|
||||
// let mat = new THREE.Matrix4()
|
||||
// mat.setPosition(new THREE.Vector3(Math.random() * 1000, Math.random() * 1000, 0));
|
||||
// (<THREE.Mesh>boxx.m_ThreeObj).material = simpleMaterial;
|
||||
// boxx.applyMatrix4(mat)
|
||||
// db.appendEntity(boxx)
|
||||
// }
|
||||
// }
|
Loading…
Reference in new issue