🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more
Socket
Book a DemoInstallSign in
Socket

@akashic-extension/akashic-box2d

Package Overview
Dependencies
Maintainers
5
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@akashic-extension/akashic-box2d

Box2D physics engine for Akashic

latest
Source
npmnpm
Version
3.1.1
Version published
Maintainers
5
Created
Source

akashic-box2d

akashic-box2d は、2D物理演算ライブラリであるBox2DWebをAkashicで利用するためのモジュールです。

本モジュールでは、AkashicでBox2DWebを使う際に便利となるよう、次の機能を提供します。

  • AkashicのエンティティとBox2Dとの紐づけ
  • スケールや角度などの単位変換メソッド
  • その他便利な機能の提供

本モジュールは AkashicとBox2DWebとの紐づけ一部の便利機能 のみを提供しています。 そのため、その他多くの機能はBox2DWebを直接利用することになります。

利用方法

akashic-cliをインストールした後、

akashic install @akashic-extension/akashic-box2d

でインストールできます。コンテンツからは、

var b2 = require("@akashic-extension/akashic-box2d");

で利用してください。 詳細な利用方法については、以下を参照してください。

Akashic Engineの詳細な利用方法については、 公式ページ を参照してください。

ビルド方法

akashic-box2d はTypeScriptで書かれたライブラリであるため、ビルドにはNode.jsが必要です。

npm run build によりgulpを使ってビルドできます。

npm install
npm run build

テスト方法

npm test

注意点

Box2DWebでは Math.random() が使われている箇所があります。(該当メソッド: Box2D.Common.Math.b2Math.Random() , Box2D.Common.Math.b2Math.RandomRange() )

該当メソッドは利用せず、かわりに g.game.random を利用してください。

ライセンス

本リポジトリは MIT License の元で公開されています。 詳しくは LICENSE をご覧ください。

ただし、画像ファイルおよび音声ファイルは CC BY 2.1 JP の元で公開されています。

また、本リポジトリの patch/index.js のライセンスはファイル中記述されています。そちらをご覧ください。

FAQs

Package last updated on 22 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts