Skip to content

Instantly share code, notes, and snippets.

@goofmint
Created Jul 9, 2017
Embed
What would you like to do?
var HelloClass = h5.cls.RootClass.extend(function (super_) {
return {
// クラス名(完全修飾名)
name: 'HelloClass',
// クラスのフィールド定義
field: {
_name: null,
_scale: {
defaultValue: 0
},
_read: {
defaultValue: "This is read only"
}
},
accessor: {
accessible: null,
scale: {
get: function() {
return this._scale;
},
set: function(val) {
this._scale = val * 100;
}
},
read: {
get: function() {
return this._read;
}
}
},
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment