Skip to content

Instantly share code, notes, and snippets.

View hajimehoshi's full-sized avatar
:octocat:
ギットハブ

Hajime Hoshi hajimehoshi

:octocat:
ギットハブ
View GitHub Profile
> Configure project :app
Configuration 'androidTestCompile' in project ':app' is deprecated. Use 'androidTestImplementation' instead.
Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.
Configuration 'testCompile' in project ':app' is deprecated. Use 'testImplementation' instead.
Observed package id 'ndk-bundle' in inconsistent location '/Users/hajimehoshi/Library/Android/sdk/ndk-bundle.r15' (Expected '/Users/hajimehoshi/Library/Android/sdk/ndk-bundle')
Already observed package id 'ndk-bundle' in '/Users/hajimehoshi/Library/Android/sdk/ndk-bundle'. Skipping duplicate at '/Users/hajimehoshi/Library/Android/sdk/ndk-bundle.r15'
Observed package id 'ndk-bundle' in inconsistent location '/Users/hajimehoshi/Library/Android/sdk/ndk-bundle.r15' (Expected '/Users/hajimehoshi/Library/Android/sdk/ndk-bundle')
Already observed package id 'ndk-bundle' in '/Users/hajimehoshi/Library/Android/sdk/ndk-bundle'. Skipping duplicate at '/Users/hajimehoshi/Library/Android/sdk/ndk-bundle.r15'
Dow
@hajimehoshi
hajimehoshi / main.go
Created February 18, 2018 14:50
Red Text
package main
import (
"image/color"
"github.com/golang/freetype/truetype"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/text"
"golang.org/x/image/font"
"golang.org/x/image/font/gofont/goregular"
// Copyright 2018 The Ebiten Authors
//
// 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,
@hajimehoshi
hajimehoshi / replace.rb
Created November 1, 2017 05:24
crbug/777775
Dir.glob('third_party/WebKit/**/*.cpp').each do |f|
next if File.basename(f) == "TaskRunnerHelper.cpp"
next if File.basename(f) == "WorkerThread.cpp"
next if File.basename(f) == "AnimationWorkletGlobalScopeTest.cpp"
# Special
#next if File.basename(f) == "WorkletGlobalScope.cpp"
#next if File.basename(f) == "WorkerGlobalScope.cpp"
@hajimehoshi
hajimehoshi / main.go
Created October 8, 2017 12:48
One-Color
package main
import (
"image"
"image/color"
"image/png"
"os"
)
var baseColor = color.RGBA{0x65, 0x73, 0x78, 0xff}
@hajimehoshi
hajimehoshi / logo.svg
Last active August 15, 2017 18:10
Ebiten Logo
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hajimehoshi
hajimehoshi / main.go
Created August 7, 2017 16:56
A sample to play a wav file
package main
import (
"log"
"os"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/audio"
"github.com/hajimehoshi/ebiten/audio/wav"
"github.com/hajimehoshi/ebiten/ebitenutil"
#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <unistd.h>
#define PAGE_SIZE (4096)
static const int size = 100 * PAGE_SIZE;
@hajimehoshi
hajimehoshi / bench_test.go
Last active May 26, 2017 18:46
GopherJS's defer performance
package test
import (
"testing"
)
var i = 0
func begin() {
i++
package main
import (
"image"
"log"
"math"
"time"
"github.com/hajimehoshi/ebiten"
"github.com/peterhellberg/plasma"