-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathLabels.js
More file actions
43 lines (35 loc) · 824 Bytes
/
Labels.js
File metadata and controls
43 lines (35 loc) · 824 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
Copyright 2017 Marcel Greter
https://www.github.com/mgreter
*/
// private scope
(function (THREE, THREEAPP)
{
"use strict";
var Labels = THREEAPP.Class.create('Labels', null, ['Plugin'])
.proto('provides', 'labels')
.defaults({
groupier: true
})
.ctor(function (app)
{
if (this.options.groupier) {
// dynamically add more group instances
app.labels = new THREEAPP.Grouped(app, {
ctor: THREEAPP.Objects.Labels,
hardLimit: 8192,
parent: app.scene
});
} else {
// only add one group with a fixed item limit
app.labels = new THREEAPP.Objects.Labels(app, {
hardLimit: 65536,
parent: app.scene
});
}
})
;
// assign class to global namespace
THREEAPP('Plugin.Labels', Labels);
// EO private scope
})(THREE, THREEAPP);