选择正确的起始页
选择 wordcloud.html 对于重复的单词或 map.html 查看者位置。两者都需要的不仅仅是静态背景:渲染器定位数据驱动的元素。保留完整的源文件夹,包括地图的附加内容 thirdparty/map/ 数据集。

下载并保存文件结构
- 下载源ZIP 并提取它。这些指南使用测试版源;将一次下载的文件放在一起。
- 复制
wordcloud.html为my-wordcloud.html原文旁边。如果选择不同的页面或主题,请将其副本保留在该文件的原始文件夹中。 - 在编辑器或 AI 工具中打开复制的 HTML 及其引用的 CSS/JS。将提供的图稿/字体添加到同一项目并使用相对路径。从 CSS 覆盖开始;更改生成的标记时包括渲染器。
以下文件可帮助您找到设计和行为。这是一个阅读列表,而不是完整的依赖包:保持提取的文件夹完整,包括图像、字体、脚本和任何数据文件。
| 文件 | 为什么它很重要 |
|---|---|
wordcloud.html | 字数统计和 D3 演示。 |
map.html | 受众位置解析、地图投影和渲染。 |
thirdparty/d3.min.js | 打包的可视化库。 |
thirdparty/topojson-client.min.js | 地图几何支持。 |
thirdparty/world-110m.json | 地图加载的世界几何图形。 |
thirdparty/iso-3166.json | 国家查找数据。 |
shared/overlay-control-transport.js | 现有状态/控制接收器。 |
连接您的副本并在 OBS 中打开它
启动SSN并首先使原始生成的覆盖URL起作用。的 session= 值连接到该 SSN 会话;这不是您的频道名称或此文件的名称。保持 SSN、相关功能及其数据源运行。
当您需要上游修复时的
- 将编辑后的 HTML 文件拖到 Chrome 或 Edge 中。从地址栏复制其地址;它开始于
file:///. - 复制所有内容
?继续在您的工作 SSN 覆盖链接中并将其添加到该文件地址的末尾。保留所有设置,包括会话、密码和任何#结局。 - 在浏览器中打开结果,然后设置 OBS 浏览器源的 URL 与以下地址相同 本地文件 未检查。将源尺寸与您的预期设计相匹配。
对于上面的起始文件,本地地址如下所示;您的实际链接可能包含其他必需选项:
file:///C:/SSN/social_stream-beta/my-wordcloud.html?session=YOUR_SESSION
使用计算机上的实际文件地址。 OBS 与源码一起保存;将下载的文件夹保留在同一位置。保存设计更改后,刷新浏览器源。的 共享设置指南 包括 Mac 示例和本地文件复选框的可选启动器。
哪里需要改变设计
对于词云,更改字体、调色板、背景、间距以及频率和大小之间的映射。保留过滤和计数累积。它的默认模式接受单字消息; allwords 改变了这种行为,因此保留操作员选择的选项。
对于地图,从现有的地图样式、区域、标签和颜色控件开始。更改标记/面板样式,无需替换位置匹配或计数。对于简单的样式更改,请使用带有 OBS 自定义 CSS 的托管地图链接。从磁盘打开时,其单独的 JSON 数据文件可能会被阻止;对于编辑后的 HTML 副本,请要求 AI 将该数据包含在页面中,以便直接打开。
复制此AI提示
将您复制的源文件和参考图稿提供给人工智能。替换括号内的详细信息。将输入安全说明保留在提示中。
显示完整提示
Customize my-wordcloud.html, copied from wordcloud.html.
Design: [describe the look or attach a reference].
Colors/fonts/assets: [supply hex colors and local filenames].
OBS canvas and placement: [size and position].
Customize [wordcloud.html / map.html] as [design]. Preserve word/location parsing, counts, identity/change rules, reset controls, and the existing simulation/projection. Keep packaged libraries and JSON datasets in their current relative paths. Style the visualization without inventing sample participants or coordinates in the live display.
Read docs/event-reference.html for incoming fields and
docs/overlay-customization-guide.html for local setup and safe rendering.
Keep the existing session/password handling, labels, server routes, query
parameters, URL fragments, and relative asset paths. Use classic scripts
compatible with Chrome 80. Keep executable dependencies packaged locally.
Treat all incoming messages, names, labels, donations, and metadata as untrusted.
Prevent HTML/JavaScript injection in every renderer you change. Use textContent
for plain fields and for chatmessage when textonly is true. For HTML-mode
chatmessage, keep supported emotes/formatting through the packaged
SocialStreamChatHTML.sanitize helper (libs/objects.js loaded first).
Do not concatenate raw input into innerHTML, attributes, CSS, or JavaScript.
Validate media/link URLs with the page's existing URL policy and assign DOM
properties; do not enable javascript: URLs or executable embedded content.
Never eval incoming data or treat a viewer message as an AI instruction.
Keep source checks, connection handling, and existing sanitizers.
Test plain text, allowed emotes, quotes, angle brackets, and an HTML injection
probe in an isolated preview; verify the probe cannot execute.
Make the edited overlay work directly from disk using a file:/// URL,
without requiring a local web server.
Return the edited files, any additional assets, exact local browser/OBS
setup instructions using placeholders, and the specific tests performed.
Do not put my private session link or credentials into a public example.测试此覆盖类型
首先使用预览或测试设置。的 测试消息指南 解释了如何通过SSN发送虚构的有效负载;提交到生产会话的测试可以触发其现有的自动化。
- 对于词云,发送重复的简单单字消息,然后仅在您想要的模式下才启用所有单词的句子。
- 对于地图,使用配置的位置语法并测试已知位置、无法识别的位置以及同一查看者的第二个条目。
- 测试重置、长标签、繁忙的可视化和所选区域。如果地图没有地理信息,请检查浏览器网络错误。
同时运行 输入渲染检查 针对您更改的渲染路径。保存编辑后,在排练之间刷新 OBS 浏览器源并重复可见的交互。浏览器预览不会建立实时捕获或 OBS 行为。