@pixifact/platform-wechat 0.7.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +26 -26
- package/package.json +38 -38
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 youxia
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 youxia
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
# @pixifact/platform-wechat
|
|
2
|
-
|
|
3
|
-
Pixifact 微信小游戏 PixiJS 平台适配器。
|
|
4
|
-
|
|
5
|
-
```bash
|
|
6
|
-
bun add @pixifact/platform-wechat
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
在 Vite 配置启用 `pixifact()`,并在 mode env 中声明:
|
|
10
|
-
|
|
11
|
-
```ini
|
|
12
|
-
VITE_PLATFORM=wechat
|
|
13
|
-
VITE_APP_ID=wx123456
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
游戏入口通过 `pixifact:platform` 使用统一 API:
|
|
17
|
-
|
|
18
|
-
```ts
|
|
19
|
-
import { createApplication } from 'pixifact:platform';
|
|
20
|
-
|
|
21
|
-
const app = await createApplication();
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
返回值是原生 PixiJS `Application`。包的顶层 import 不读取 `wx` 或执行平台初始化;Canvas、输入、生命周期和资源 adapter 在 `createApplication()` 时安装。资源继续使用 PixiJS `Assets`,分包在首次读取前自动加载。
|
|
25
|
-
|
|
26
|
-
完整配置见 [微信小游戏构建](https://github.com/hxg2050/pixifact/blob/main/docs/zh/wechat-minigame.md)。
|
|
1
|
+
# @pixifact/platform-wechat
|
|
2
|
+
|
|
3
|
+
Pixifact 微信小游戏 PixiJS 平台适配器。
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
bun add @pixifact/platform-wechat
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
在 Vite 配置启用 `pixifact()`,并在 mode env 中声明:
|
|
10
|
+
|
|
11
|
+
```ini
|
|
12
|
+
VITE_PLATFORM=wechat
|
|
13
|
+
VITE_APP_ID=wx123456
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
游戏入口通过 `pixifact:platform` 使用统一 API:
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
import { createApplication } from 'pixifact:platform';
|
|
20
|
+
|
|
21
|
+
const app = await createApplication();
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
返回值是原生 PixiJS `Application`。包的顶层 import 不读取 `wx` 或执行平台初始化;Canvas、输入、生命周期和资源 adapter 在 `createApplication()` 时安装。资源继续使用 PixiJS `Assets`,分包在首次读取前自动加载。
|
|
25
|
+
|
|
26
|
+
完整配置见 [微信小游戏构建](https://github.com/hxg2050/pixifact/blob/main/docs/zh/wechat-minigame.md)。
|
package/package.json
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@pixifact/platform-wechat",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Pixifact 微信小游戏 PixiJS 平台适配器。",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./dist/index.js",
|
|
7
|
-
"module": "./dist/index.js",
|
|
8
|
-
"types": "./dist/index.d.ts",
|
|
9
|
-
"files": [
|
|
10
|
-
"dist/",
|
|
11
|
-
"README.md"
|
|
12
|
-
],
|
|
13
|
-
"repository": {
|
|
14
|
-
"type": "git",
|
|
15
|
-
"url": "https://github.com/hxg2050/pixifact",
|
|
16
|
-
"directory": "packages/platform-wechat"
|
|
17
|
-
},
|
|
18
|
-
"sideEffects": false,
|
|
19
|
-
"exports": {
|
|
20
|
-
".": {
|
|
21
|
-
"types": "./dist/index.d.ts",
|
|
22
|
-
"import": "./dist/index.js",
|
|
23
|
-
"require": "./dist/index.js"
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
"scripts": {
|
|
27
|
-
"build": "bun ../pixifact/scripts/clean-dist.mjs dist && bunx --no-install tsc -p tsconfig.build.json && bun ../pixifact/scripts/fix-dist-esm-imports.mjs dist"
|
|
28
|
-
},
|
|
29
|
-
"peerDependencies": {
|
|
30
|
-
"pixifact": ">=0.
|
|
31
|
-
"pixi.js": ">=8.3.0"
|
|
32
|
-
},
|
|
33
|
-
"publishConfig": {
|
|
34
|
-
"access": "public",
|
|
35
|
-
"registry": "https://registry.npmjs.org/"
|
|
36
|
-
},
|
|
37
|
-
"license": "MIT"
|
|
38
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@pixifact/platform-wechat",
|
|
3
|
+
"version": "0.9.0",
|
|
4
|
+
"description": "Pixifact 微信小游戏 PixiJS 平台适配器。",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist/",
|
|
11
|
+
"README.md"
|
|
12
|
+
],
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "https://github.com/hxg2050/pixifact",
|
|
16
|
+
"directory": "packages/platform-wechat"
|
|
17
|
+
},
|
|
18
|
+
"sideEffects": false,
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"import": "./dist/index.js",
|
|
23
|
+
"require": "./dist/index.js"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build": "bun ../pixifact/scripts/clean-dist.mjs dist && bunx --no-install tsc -p tsconfig.build.json && bun ../pixifact/scripts/fix-dist-esm-imports.mjs dist"
|
|
28
|
+
},
|
|
29
|
+
"peerDependencies": {
|
|
30
|
+
"pixifact": ">=0.9.0 <1",
|
|
31
|
+
"pixi.js": ">=8.3.0"
|
|
32
|
+
},
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"access": "public",
|
|
35
|
+
"registry": "https://registry.npmjs.org/"
|
|
36
|
+
},
|
|
37
|
+
"license": "MIT"
|
|
38
|
+
}
|