File tree 2 files changed +34
-0
lines changed
scripts/developer/libraries
2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ root = true
2
+
3
+ # 4-space indentation
4
+ [* ]
5
+ indent_style = space
6
+ indent_size = 4
Original file line number Diff line number Diff line change 6
6
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
7
7
//
8
8
9
+ if ( ! Function . prototype . bind ) {
10
+ Function . prototype . bind = function ( oThis ) {
11
+ if ( typeof this !== 'function' ) {
12
+ // closest thing possible to the ECMAScript 5
13
+ // internal IsCallable function
14
+ throw new TypeError ( 'Function.prototype.bind - what is trying to be bound is not callable' ) ;
15
+ }
16
+
17
+ var aArgs = Array . prototype . slice . call ( arguments , 1 ) ,
18
+ fToBind = this ,
19
+ fNOP = function ( ) { } ,
20
+ fBound = function ( ) {
21
+ return fToBind . apply ( this instanceof fNOP
22
+ ? this
23
+ : oThis ,
24
+ aArgs . concat ( Array . prototype . slice . call ( arguments ) ) ) ;
25
+ } ;
26
+
27
+ if ( this . prototype ) {
28
+ // Function.prototype doesn't have a prototype property
29
+ fNOP . prototype = this . prototype ;
30
+ }
31
+ fBound . prototype = new fNOP ( ) ;
32
+
33
+ return fBound ;
34
+ } ;
35
+ }
36
+
9
37
vec3toStr = function ( v , digits ) {
10
38
if ( ! digits ) { digits = 3 ; }
11
39
return "{ " + v . x . toFixed ( digits ) + ", " + v . y . toFixed ( digits ) + ", " + v . z . toFixed ( digits ) + " }" ;
You can’t perform that action at this time.
0 commit comments