@cqengines/web-player-engine 0.0.0-stage → 1.1.15

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/README.md CHANGED
@@ -1,3 +1,19 @@
1
- # Temporary Holding Version
1
+ # @cqengines/web-player-engine
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ 苍穹游戏引擎(CQEngine)的 WASM 引擎文件,配合 `@cqengines/web-player@1.1.15` 使用。两个包都从苍穹平台的 npm 源安装
4
+ (`npm config set "@cqengine:registry" "<平台地址>/npm/"`),不在公共 npm 上。
5
+ 本包只有静态文件:`cqengine.js`(ES 模块工厂)、`cqengine.wasm`、`cqengine.data`(开屏核心资源)、字体 / Lua / 游戏运行资源的压缩分包与校验清单 `engine-manifest.json`。
6
+
7
+ 把这个目录发布到你的站点或 CDN,然后:
8
+
9
+ ```js
10
+ import { CangqiongPlayer } from '@cqengines/web-player';
11
+ await CangqiongPlayer.mount(el, {
12
+ engineBaseUrl: '/static/cqengine/1.1.15/', // 自己托管:把 node_modules/@cqengines/web-player-engine/ 拷到这里
13
+ // engineBaseUrl: 'https://cdn.example.com/cqengine/1.1.15/', // 或放到自己的 CDN
14
+ launch,
15
+ });
16
+ ```
17
+
18
+ 服务器要求:`.wasm` 用 `Content-Type: application/wasm`;目录带版本号并设置长缓存;跨域加载时返回 CORS 头。
19
+ 详见苍穹 Web 播放器接入指南(docs/platform/web-player-sdk.md)。播放器与引擎包版本保持一致。