Created
July 9, 2017 07:07
-
-
Save goofmint/aadb4b166dbb24d1dbe60e4db7331c6b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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