Live2DWebCanvas

描述

Live2DWebCanvas adds an interactive character to your site. Configure its model, size, position, toolbar, and messages from the WordPress administration screen.

Features include:

  • Classic Live2D models without requiring the Pro add-on.
  • Page and widget layouts.
  • Configurable messages and classic model textures.
  • Administrator-managed classic model downloads.
  • Persistent model storage and shared file validation.
  • Optional external quote and chat services.
  • Optional WordPress AI Client integration with administrator-selected providers and models. This backend is callable only when explicitly enabled and requires a logged-in WordPress user.

Documentation and source code are available online. Chinese instructions are included in README.md and readme.zh-CN.txt. This directory readme uses English as required by WordPress.org.

Classic rendering, layout, toolbar, messages and shared features remain in Free. Models requiring Cubism Core, modern model hosting and exclusive rendering controls are supplied by the separate Pro add-on, which requires Free. Get Pro from the official website. Existing customers can use their original account to check their entitlement; the split does not require buying the same entitlement again.

Free does not bundle or automatically download Pro code. Its settings page links to the standard WordPress upload page, where an administrator can upload and activate the Pro ZIP. Pro features appear on the existing settings page after compatibility and account entitlement are verified; Free files are not overwritten.

Optional external services may require an account and separate service entitlement. Without a compatible Pro add-on, a previously configured modern model is paused, not replaced with a different character.

External Services

The following services may be contacted according to the features and models you configure:

  • Live2DWeb (www.live2dweb.com and api.live2dweb.com): account login, license verification, model services, and optional chat. Requests can include the site URL, account key or signed token, and data required by the selected feature. See the service website for its current terms and privacy information.
  • download.live2dweb.com: classic model archive downloads initiated by an administrator. The service receives the requested model identifier and authentication information.
  • Configured model hosts: browsers or the WordPress server request the manifest and resources at the administrator-selected model URL. The host receives normal HTTP connection information. Pro server-side model proxy requests reject non-public destinations.
  • Optional quote providers, including hitokoto.cn, jinrishici.com, and fghrsh.net: the browser requests quotations when that provider is selected. Review the selected provider’s terms and privacy information before enabling it.
  • Optional chat services: when chat is enabled, prompts and the configured conversation context are sent to the selected service. Do not send sensitive information without the necessary consent.
  • WordPress AI providers: when the built-in backend is selected, this plugin passes the user’s message and the saved system instruction to the site’s configured WordPress AI provider. The provider handles credentials and its own external service requests. This path does not use the Live2DWeb chat backend.

Source and Build Information

The WordPress PHP source is included in this plugin. JavaScript and CSS build sources are in the ordinary live2d_sdk directory of the project repository, not a submodule. Install its locked dependencies and run npm run build from that directory. The private Pro SDK is not required to build Free. WordPress supplies jQuery and Moment.js.

Third-Party Licenses

The plugin’s own code is distributed under the MIT license. Third-party components retain their own licenses.

The modern Cubism Core runtime is not included in Free. Older Live2D runtime/framework and model-resource licenses must be reviewed separately; the product being free of charge does not establish GPL compatibility. This unpublished split is not a claim of WordPress.org license approval. Preserve upstream notices and obtain any required permissions.

This plugin is not an official product of Live2D Inc.

安装

  1. Upload the live-2d directory to wp-content/plugins, or install the plugin through WordPress.
  2. Activate Live2DWebCanvas.
  3. Open Settings > Live 2D and configure a model.
  4. Download classic models through the administrator workshop or configure a classic model URL.

Before upgrading an old combined plugin, back up its database and model directory. Do not deactivate or delete the old plugin first. Eligible Pro users can install the Pro migration bridge while the old plugin remains active, then copy and verify models into uploads/live2d-models before replacing Free. Other users must arrange an administrator-verified copy and backup before upgrading. A post-upgrade migration cannot recover files already deleted by the updater. Multisite legacy storage requires a network administrator’s backup and per-site migration.

PHP cURL with TLS support is required for Pro server-side remote model retrieval. These requests are pinned to validated public IPv4 destinations. HTTP proxies are not supported for that path; upload the model locally instead. Locally hosted models do not require requests to an external model host. ZIP model installation uses the WordPress filesystem API, with ZipArchive where available.

常见问题

Can visitors download models onto the server?

No. Downloads require administrator authorization. Pro viewing sessions are limited to configured models and cannot enqueue downloads. Public page nonces and one-time session tokens are not administrator credentials.

Which filenames are supported?

Model paths use letters, numbers, underscores, hyphens, and dots. Cubism compound filenames such as Haru.model3.json and idle.motion3.json are supported. Executable files, hidden path components, traversal, and symbolic links are rejected. File contents must match the supported model, JSON, texture, audio, or text format.

What should I do after upgrading from 2.2.1 or earlier?

Refresh pages to obtain new viewing sessions. Re-enqueue any old model download jobs from the administration screen. If the affected mode was enabled, inspect existing model directories and other site files for compromise. Updating the plugin does not remove previously planted files.

评价

2021 年 8 月 25 日
这个问题我找了好多,差不多花了4,5个小时,4,5个小时的失败还是挺难受的,但是最后我发现问题一个可能是中文路径,另一个是api少加了个/在最前面,导致在不是主页的界面网页不去根目录读,去带后缀的根目录底下读了,就找不到。可惜一开始没报404,改成全英文之后才这么报的,我也是醉了。真的是非常棒的插件!
2021 年 3 月 7 日 1 回复
基本上我的问题跟评论里有个老哥说的一样,插件安装了也启用了,但前端没有任何显示。为此我把网站所有错误和警告都修了个遍,但依然没有什么帮助。后来我把主题切换成默认主题,它显示出来了!后来我换了好几个主题,这个插件都可用正常显示,好像只有我一直使用的这个名叫INNAO的主题与这个插件不兼容,主题作者那边我也联系了,他也没什么头绪。然后我尝试通过各种渠道查找这个插件作者的联系方式,然而我即便找到了插件论坛、一个古老的旧网站、可能是作者的微博,但依旧没有取得任何回复。我只能寄希望于插件作者能看到这条评论、找出可能是什么原因导致它不能显示出来并尽快通过更新修好它。求求了!我真的特别喜欢这个插件!晚一天把它安到我的网站上都会让我多失眠一天!(对了,网站依然显示的错误与警告是关于JQuery的,也许是没有引入正确的JQuery版本?应该引入哪个版本的JQuery呢?)
2020 年 8 月 4 日 1 回复
我很喜欢插件可以在后台定制模型大小、人物语言的功能。这免去了我们去更改js文件。 不过我尝试了很久,无论是PC还是移动端都显示不出。即便是把api的内容下载到服务器目录也无用。也许是因为sakuraio主题与之相冲突。 8.4更新 作者很快就更新了,可以正常使用 super赞!
阅读所有8条评价

贡献者及开发者

「Live2DWebCanvas」是开源软件。 以下人员对此插件做出了贡献。

贡献者

帮助将「Live2DWebCanvas」翻译成简体中文。

对开发感兴趣吗?

您可以浏览代码,查看SVN仓库,或通过RSS订阅开发日志。

更新日志

2.3.0

  • Split classic/shared Free functionality from the separately distributed Cubism Core Pro add-on.
  • Preserve model settings and account state when Pro is unavailable or the plugin is deactivated.
  • Add verified persistent-storage migration and prominent edition, acquisition and upload information.
  • Security: restrict viewing sessions to configured models and stop trusting client-supplied manifests.
  • Security: remove visitor-triggered downloads; require administrator-authorized download jobs.
  • Security: validate paths, extensions, and contents before saving model files.
  • Security: validate redirect destinations and pin remote connections to public addresses.
  • Security: harden administrator output and remove credential-bearing diagnostic logs.
  • Security: require administrator authorization for account-binding callbacks; use the existing Key settings form to log in.
  • Security: require HTTPS for classic model downloads and validate archive members before either extraction backend writes files.
  • Security: require explicit opt-in before using the site’s WordPress AI provider.
  • Security: sanitize message HTML and reject unsafe toolbar navigation URLs.
  • Change: keep classic/shared features independent of Pro; modern-only implementation is not bundled.
  • Compatibility: preserve Pro administrator uploads, public viewing sessions, signed resources, and local model caching.
  • Maintenance: use WordPress-provided Moment.js and update plugin-directory metadata.

2.2.1

  • Fix classic multi-skin model loading and shared resources.
  • Improve model lifecycle cleanup and IndexedDB asset caching.
  • Update Cubism shader delivery.

2.2.0

  • Add self-hosted custom model protection and update optional chat integration.

For earlier changes, see the repository history.