I mean, the classes introduced in ECMAScript 2015
like so:
class Person {
//private properties
private var personName : String;
private var personAge : Number;
//constructor
function Person(name: string, age: int){
personName = name;
personAge = age;
}
//public function
function sayAge(){
alert(personAge);
}
}
var person = new Person(“James”, 30);
person.sayAge(); //30
Is it because there are many cellphones not supporting ECMAScript 2015 or because THREE started before that and is still using the old way?
I find that defining a class like above is much more elegant.
What I’m really asking is whether there is a possible compatibility problem with some cellphones as I’m about to use it myself.