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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@akashic/engine-files

v3.8.3

Published

A library that manages versions of libraries related to Akashic Engine

Downloads

8,593

Readme

engine-files

Akashic Engine に関連するファイルをまとめて UMD にし、zip 圧縮したファイルを作ります。

このリポジトリは、Akashic Engine 実行系が共通で使うファイルを生成するものです。 ゲーム開発者が利用する必要はありません。

利用法

次のコマンドで、 ./dist/raw/ 以下に成果物が生成されます。

npm i
npm run build

成果物

  • ./dist/raw/debug/full/engineFilesV*_*_*.js
    • Canvas レンダラおよび WebGL レンダラを含むデバッグ用の成果物
  • ./dist/raw/debug/canvas/engineFilesV*_*_*_Canvas.js
    • Canvas レンダラを含むデバッグ用の成果物
  • ./dist/raw/release/full/engineFilesV*_*_*.js
    • Canvas レンダラおよび WebGL レンダラを含むリリース用用の成果物
  • ./dist/raw/release/canvas/engineFilesV*_*_*_Canvas.js
    • Canvas レンダラを含むリリース用の成果物

engineFilesV*_*_*.js は依存関係を持つ次のモジュールをすべてまとめた UMD 形式のファイルです。

このファイルは、概念的には次のような型の値をexportします。

import * as g from "@akashic/akashic-engine";
import * as gdr from "@akashic/game-driver";
import * as pdib from "@akashic/pdi-browser";

export interface EngineFilesObject {
    akashicEngine: typeof g;
    gameDriver: typeof gdr;
    pdiBrowser: typeof pdib;
}

ファイル名は engineFilesV0_0_1.js のような形式です (V の後はこのモジュール (engine-files) のバージョンです)。 非 CommonJS 環境では、ファイル名の拡張子以外の部分 (e.g. engineFilesV0_0_1) の名前のグローバル変数を定義します。

Node.js など window が存在しない環境では pdiBrowser の値が null になります。

npm モジュールとして利用

本モジュールを利用側で import します。

import { akashicEngine as g } from "@akashic/engine-files";

...

内部モジュールの更新方法

こちら からワークフローを実行してください。 更新が必要なモジュールをチェックした後に Run Workflow を実行することで PullRequest が作成されます。

テスト

reftest の実行

npm test コマンドで reftest が実行されます。 reftest で利用するコンテンツは tests/fixtures/*/game.json として格納し、 game.json と同一の場所にその他必要な設定ファイルとテスト結果を出力するディレクトリを配置する必要があります。

| ディレクトリ/ファイル | 内容 | | ------------- | ------------- | | scenario.json | コンテンツの動作を定義する設定ファイル。 | | expected/ | scenario.json で定義された動作の正解画像データ。 | | actual/debug/full/ | デバッグビルドされた成果物の実際の出力画像データ。 | | actual/debug/canvas/ | Canvas 版でデバッグビルドされた成果物の実際の出力画像データ。 | | actual/release/full/ | リリースビルドされた成果物の実際の出力画像データ。 | | actual/release/canvas/ | Canvas 版でリリースビルドされた成果物の実際の出力画像データ。 | | diff/debug/full/ | デバッグビルドされた成果物の実際の出力画像データと正解画像データとの差分画像データ。 | | diff/debug/canvas/ | Canvas 版でデバッグビルドされた成果物の実際の出力画像データ。と正解画像データとの差分画像データ。 | | diff/release/full/ | リリースビルドされた成果物の実際の出力画像データ。と正解画像データとの差分画像データ。 | | diff/release/canvas/ | Canvas 版でリリースビルドされた成果物の実際の出力画像データと正解画像データとの差分画像データ。 |

また、テストにはビルド成果物が必要です。 あらかじめ npm run build などで dist/raw/{release,debug}/{full,canvas}/engineFilesV{n}_{n}_{n}.js ファイルを生成しておいてください。

reftest の正解画像データの更新

以下のコマンドで reftest に必要な正解画像データを更新できます。

npm run update-expected

ライセンス

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

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