Skip to content

Instantly share code, notes, and snippets.

@Zyko0
Zyko0 / main.go
Created May 5, 2024 12:16
Ribbon
package main
import (
"fmt"
"image/color"
"log"
"math"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
@Zyko0
Zyko0 / main.go
Created May 1, 2024 17:46
text/v2: DrawTriangles implementation
package main
import (
"bytes"
"fmt"
"image/color"
"log"
"os"
"runtime/pprof"
@Zyko0
Zyko0 / main.go
Created October 5, 2023 17:36
Ebitengine: FSR port
package main
import (
"fmt"
"log"
"os"
"image/png"
"github.com/hajimehoshi/ebiten/v2"
@Zyko0
Zyko0 / main.go
Last active July 6, 2023 15:16
Ebitengine: MouseCaptured in wasm
package main
import (
"fmt"
"log"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
)
@Zyko0
Zyko0 / main.go
Last active June 21, 2023 07:49
Ebiten: apparent seams when drawing tiles with DrawTriangles
package main
import (
"errors"
"fmt"
"image"
"image/color"
"log"
"github.com/hajimehoshi/ebiten/v2"
@Zyko0
Zyko0 / main.go
Created February 15, 2023 18:13
ebiten: Region size changing
package main
import (
"image/color"
"log"
"math/rand"
"github.com/hajimehoshi/ebiten/v2"
)
@Zyko0
Zyko0 / main.go
Last active June 26, 2022 21:31
DrawRectShader without image
package main
import (
"log"
"github.com/hajimehoshi/ebiten/v2"
)
var (
s *ebiten.Shader
@Zyko0
Zyko0 / main.go
Created November 16, 2021 19:08
ebiten: Test debug string
package main
import (
"errors"
"fmt"
"image/color"
"log"
"math/rand"
"os"
"runtime/pprof"
@Zyko0
Zyko0 / debugprint.go
Last active November 16, 2021 19:06
ebitenutil/debugprint.go: Using triangles instead of images
// Copyright 2014 Hajime Hoshi
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,