github.com/primecitizens/pcz/std@v0.2.1/plat/js/webext/requirements/apis_js_wasm.go (about) 1 // SPDX-License-Identifier: Apache-2.0 2 // Copyright 2023 The Prime Citizens 3 4 package requirements 5 6 import ( 7 "github.com/primecitizens/pcz/std/ffi/js" 8 "github.com/primecitizens/pcz/std/plat/js/webext/requirements/bindings" 9 ) 10 11 type ThreeDFeature uint32 12 13 const ( 14 _ ThreeDFeature = iota 15 16 ThreeDFeature_WEBGL 17 ThreeDFeature_CSS_3D 18 ) 19 20 func (ThreeDFeature) FromRef(str js.Ref) ThreeDFeature { 21 return ThreeDFeature(bindings.ConstOfThreeDFeature(str)) 22 } 23 24 func (x ThreeDFeature) String() (string, bool) { 25 switch x { 26 case ThreeDFeature_WEBGL: 27 return "webgl", true 28 case ThreeDFeature_CSS_3D: 29 return "css3d", true 30 default: 31 return "", false 32 } 33 }