add and bind file loading + api
This commit is contained in:
parent
2666069a27
commit
06194a2415
5 changed files with 39 additions and 12 deletions
|
|
@ -211,6 +211,7 @@ let model = {
|
|||
}
|
||||
};
|
||||
|
||||
// api is augmented in mesh.build
|
||||
let api = mesh.api = {
|
||||
clear() {
|
||||
for (let group of group.list()) {
|
||||
|
|
@ -245,6 +246,11 @@ let api = mesh.api = {
|
|||
|
||||
model,
|
||||
|
||||
import() {
|
||||
// binding created in mesh.build
|
||||
$('import').click();
|
||||
},
|
||||
|
||||
objects() {
|
||||
// return model objects suitable for finding ray intersections
|
||||
return group.list().map(o => o.models).flat().map(o => o.object);
|
||||
|
|
|
|||
Loading…
Reference in a new issue