infamous
Version:
A CSS3D/WebGL UI library.
15 lines (12 loc) • 434 B
JavaScript
import XYZValues from './XYZValues'
import Class from 'lowclass'
export default
Class('XYZStringValues').extends(XYZValues, ({ Super }) => ({
default: { x: '', y: '', z: '' },
checkValue(prop, value) {
if (!Super(this).checkValue(prop, value)) return false
if ( typeof value !== 'string' )
throw new TypeError(`Expected ${prop} to be a string. Received: ${value}`)
return true
},
}))