npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@yasshi2525/simple-game-stick

v1.0.0

Published

game stick extension for akashic engine (original author: dera-)

Readme

gamestick_sample

Akashic Engine 向け ゲームスティック 拡張ライブラリ

Akashic Engineにおいて、ゲームスティックを利用するための拡張ライブラリです。

インストール方法

Akashic Engineプロジェクトにて下記コマンドを実行してください.

akashic install @yasshi2525/simple-game-stick

利用方法

@yasshi2525/simple-game-stick モジュールの GameStickEntity クラスを利用することで、ゲームスティックエンティティを作成できます。

  • JavaScriptの場合
const { GameStickEntity } = require("@yasshi2525/simple-game-stick");
  • Typescriptの場合
import { GameStickEntity } from "@yasshi2525/simple-game-stick";

下記のコードでは、ゲームスティックを作成し、毎フレームゲームスティックの位置をコンソールに出力します。 (JavaScript, Typescript 共通)

const scene = new g.Scene({ game: g.game })
scene.onLoad.add(() => {
  const obj = new GameStickEntity({
    scene,
    func: pos => {
      // pos.x, pos.y には -1 から +1 の範囲でゲームスティックの位置が格納されます。
      console.log(`GameStick position: (${pos.x}, ${pos.y})`);
    }
  });
  scene.append(obj);
});
g.game.pushScene(scene);

オプション

GameStickEntity のコンストラクタにパラメータを指定することで以下のようにカスタマイズできます。

const obj = new GameStickEntity({
  scene, // 配置するシーン
  area: { x: 10, y: 20, width: 200, height: 200 }, // 配置する場所と大きさ
  size: { width: 150, height: 150}, // バーチャルスティック本体の大きさ
  image: scene.asset.getImage("/assets/your-gamestick-image.png"), // バーチャルスティックの画像
  func: pos => { /* 毎フレーム呼び出される、ゲームスティックの位置を受け取る処理 */ },
});

| パラメータ名 | 設定例 | 必須か | 省略時のデフォルト値 | 説明 | |---------|-----------------------------------------------|-----|--------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------| | scene | g.Scene インスタンス | yes | --- | ゲームスティックを配置するシーンを指定します。 | | area | { x: 100, y: 100, width: 400, height: 400 } | no | x, y, width, height の値。 width, height の指定がないときは画像の大きさ。 | ゲームスティックの配置場所と大きさを指定します。背景となるバーチャルスティックの影の大きさと一致します。指定すると x, y, width, height に値が設定されます。 size の方が大きい場合、 size の大きさに上書きされます。 | | size | {width: 350, height: 350} | no | 画像の半分の大きさ | バーチャルスティック本体の大きさを指定します。 area の大きさより大きい場合、 area の大きさを上書きします。 | | image | g.ImageAsset インスタンス | no | 本ライブラリ組み込みの画像 | バーチャルスティックとして描画する画像。 | | func | pos => { /* ... */ } | no | --- | ゲームスティックの位置を受け取った後の処理を指定します。引数 pospos.xpos.y にはゲームスティックの位置が -1 から +1 の範囲で格納されます。毎フレーム呼び出されます。 |

その他のオプションの詳細は g.EParameterObject を参照してください。

使い方の詳細

具体的な使い方はサンプルプロジェクトを参照してください。

アンインストール方法

Akashic Engineプロジェクトにて下記コマンドを実行してください.

akashic uninstall @yasshi2525/simple-game-stick

License

MIT License

Credits

本プロジェクトは dera- 氏が作成したコードを拡張ライブラリ向けに yasshi2525 が改変したものです。

This project is based on the original work by dera-.

Modifications and ongoing maintenance by yasshi2525.

本ページのスクリーンショットの画像ならびにサンプルプロジェクトの画像素材 には Akashic Engineクリエイティブ・コモンズ 表示 2.1 日本ライセンス の元で公開している GALAXY WARS の画像を利用しています。