forked from mrdoob/three.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, |