Skip to content

Commit

Permalink
Create Raycast.md
Browse files Browse the repository at this point in the history
  • Loading branch information
lmj01 committed May 30, 2022
1 parent 8f89c20 commit 0143c65
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/mj/Raycast.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Raycast

射线用来求交的

```js
class Object3D extends EventDispatcher {
raycast( /* raycaster, intersects */ ) {}
}
class Raycaster {

}
```
要想进行拾取操作,就需要实现raycast,新的对象要继承Object3D并实现它,就可以通过Raycaster测试相交
内部支持的类型有
Points,
Line,
Sprite,
Mesh,
InstancedMesh,
LOD,

0 comments on commit 0143c65

Please sign in to comment.