func (e *Editor) initSelectSprite() { img, _ := assets.DecodeImage(bytes.NewBuffer(util.Base64ToBytes(GeometryIconData))) mat := renderer.NewMaterial(renderer.NewTexture("diffuseMap", img, false)) selectSprite := effects.CreateSprite(1, 1, 1, mat) spriteNode := renderer.NewNode() spriteNode.RendererParams = &renderer.RendererParams{Unlit: true} spriteNode.Add(selectSprite) e.selectSprite = selectSprite e.gameEngine.AddSpatialTransparent(spriteNode) }
func getDefaultFont() []byte { return util.Base64ToBytes(defaultFontData) }
func loadImageAsset(key, data string, uiAssets ui.HtmlAssets) { img, _ := assets.DecodeImage(bytes.NewBuffer(util.Base64ToBytes(data))) uiAssets.AddImage(key, img) }