@machinal/scenes 0.0.0-stage → 0.1.1
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/CHANGELOG.md +27 -0
- package/LICENSE +201 -0
- package/LICENSING.md +13 -0
- package/NOTICE +8 -0
- package/README.md +183 -2
- package/bin/machinal-scenes.mjs +89 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +2 -0
- package/dist/runtime/artifact.d.ts +18 -0
- package/dist/runtime/artifact.js +26 -0
- package/dist/runtime/bridge.d.ts +8 -0
- package/dist/runtime/bridge.js +76 -0
- package/dist/runtime/choreography.d.ts +32 -0
- package/dist/runtime/choreography.js +81 -0
- package/dist/runtime/controller.d.ts +5 -0
- package/dist/runtime/controller.js +93 -0
- package/dist/runtime/geometry.d.ts +20 -0
- package/dist/runtime/geometry.js +34 -0
- package/dist/runtime/index.d.ts +14 -0
- package/dist/runtime/index.js +14 -0
- package/dist/runtime/layout.d.ts +17 -0
- package/dist/runtime/layout.js +48 -0
- package/dist/runtime/math.d.ts +4 -0
- package/dist/runtime/math.js +23 -0
- package/dist/runtime/media.d.ts +2 -0
- package/dist/runtime/media.js +69 -0
- package/dist/runtime/models.d.ts +14 -0
- package/dist/runtime/models.js +370 -0
- package/dist/runtime/objects.d.ts +8 -0
- package/dist/runtime/objects.js +24 -0
- package/dist/runtime/parameters.d.ts +17 -0
- package/dist/runtime/parameters.js +35 -0
- package/dist/runtime/resources.d.ts +5 -0
- package/dist/runtime/resources.js +63 -0
- package/dist/runtime/types.d.ts +76 -0
- package/dist/runtime/types.js +1 -0
- package/dist/runtime/validation.d.ts +4 -0
- package/dist/runtime/validation.js +37 -0
- package/dist/runtime/video.d.ts +90 -0
- package/dist/runtime/video.js +46 -0
- package/dist/svelte/SceneCanvas.svelte +15 -0
- package/dist/svelte/SceneCanvas.svelte.d.ts +8 -0
- package/dist/svelte/SceneThree.svelte +61 -0
- package/dist/svelte/SceneThree.svelte.d.ts +10 -0
- package/dist/svelte/SceneVideo.svelte +38 -0
- package/dist/svelte/SceneVideo.svelte.d.ts +18 -0
- package/dist/svelte/context.d.ts +12 -0
- package/dist/svelte/context.js +8 -0
- package/dist/svelte/index.d.ts +9 -0
- package/dist/svelte/index.js +8 -0
- package/dist/svelte/model-assets.d.ts +4 -0
- package/dist/svelte/model-assets.js +42 -0
- package/dist/svelte/mount.svelte.d.ts +3 -0
- package/dist/svelte/mount.svelte.js +42 -0
- package/dist/svelte/three-rigs.d.ts +20 -0
- package/dist/svelte/three-rigs.js +22 -0
- package/dist/svelte/three-session.d.ts +6 -0
- package/dist/svelte/three-session.js +66 -0
- package/dist/svelte/three.d.ts +15 -0
- package/dist/svelte/three.js +33 -0
- package/examples/quickstart/gitignore +6 -0
- package/examples/quickstart/index.html +48 -0
- package/examples/quickstart/package.json +27 -0
- package/examples/quickstart/scene.config.json +11 -0
- package/examples/quickstart/scene.html +13 -0
- package/examples/quickstart/src/ExportPanel.svelte +74 -0
- package/examples/quickstart/src/Title.svelte +22 -0
- package/examples/quickstart/src/export-api.ts +30 -0
- package/examples/quickstart/src/main.ts +114 -0
- package/examples/quickstart/src/playback.ts +6 -0
- package/examples/quickstart/src/request.ts +5 -0
- package/examples/quickstart/src/scene.ts +12 -0
- package/examples/quickstart/src/useLocalExport.svelte.ts +46 -0
- package/examples/quickstart/src/workspace.css +79 -0
- package/examples/quickstart/svelte.config.js +1 -0
- package/examples/quickstart/tools/local-export.mjs +120 -0
- package/examples/quickstart/tsconfig.json +15 -0
- package/examples/quickstart/vite.config.js +17 -0
- package/native/THIRD_PARTY_NOTICES.txt +158 -0
- package/native/darwin-arm64/scene-render +0 -0
- package/native/darwin-x64/scene-render +0 -0
- package/native/linux-x64/scene-render +0 -0
- package/native/manifest.json +33 -0
- package/native/win32-x64/scene-render.exe +0 -0
- package/node/cli-output.mjs +10 -0
- package/node/download.mjs +37 -0
- package/node/ffmpeg-releases.mjs +24 -0
- package/node/index.d.ts +50 -0
- package/node/index.mjs +2 -0
- package/node/platforms.mjs +14 -0
- package/node/render.mjs +59 -0
- package/node/toolchain.mjs +118 -0
- package/package.json +89 -4
- package/renderer/browser.go +116 -0
- package/renderer/browser_log.go +36 -0
- package/renderer/browser_log_test.go +48 -0
- package/renderer/browser_test.go +307 -0
- package/renderer/cmd/scene-render/main.go +128 -0
- package/renderer/cmd/scene-render/main_test.go +37 -0
- package/renderer/cmd/scene-render/server.go +42 -0
- package/renderer/encoder.go +116 -0
- package/renderer/encoder_test.go +22 -0
- package/renderer/go.mod +11 -0
- package/renderer/go.sum +10 -0
- package/renderer/network.go +50 -0
- package/renderer/output.go +93 -0
- package/renderer/pipeline.go +108 -0
- package/renderer/pipeline_test.go +108 -0
- package/renderer/render.go +141 -0
- package/renderer/request.go +140 -0
- package/renderer/request_test.go +94 -0
- package/renderer/types.go +113 -0
- package/renderer/worker.go +110 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.1
|
|
4
|
+
|
|
5
|
+
- Show readable setup/doctor status and a concise render result by default; use `--json` for complete tool and scene metadata. The Node API and saved scene manifests are unchanged.
|
|
6
|
+
- Report the native renderer's real version instead of its help banner.
|
|
7
|
+
- Reuse cached tools without announcing another Chrome or FFmpeg installation; FFmpeg integrity and license checks still run.
|
|
8
|
+
- Fix negative preview frames when an animation timestamp precedes the Play click, including pause/resume and end-of-scene replay.
|
|
9
|
+
- Default the starter scene to 1280×720 and show the complete local export path; clarify that the standalone tool has no S3 upload or project connection.
|
|
10
|
+
- Styled, responsive quickstart workspace with preview transport and an in-browser local export panel.
|
|
11
|
+
- Explicit rendering-tool download, prerequisite checks, build/render status, actionable errors and completed MP4 downloads.
|
|
12
|
+
- Browser exports save unique videos and manifests in `renders/` without replacing earlier exports; CLI export remains available.
|
|
13
|
+
|
|
14
|
+
## 0.1.0
|
|
15
|
+
|
|
16
|
+
- Initial public `@machinal/scenes` distribution, combining the runtime and Svelte integration in one package.
|
|
17
|
+
- Root, `/runtime`, `/svelte` and `/node` entrypoints with TypeScript declarations.
|
|
18
|
+
- Frame-based seeking, resource readiness, CSS animation seeking and reproducible seeded randomness.
|
|
19
|
+
- Svelte 5 canvas, video and Three.js scene integration with choreography, geometry and object helpers.
|
|
20
|
+
- Standalone Vite quickstart, with no account or native-rendering setup required for preview.
|
|
21
|
+
- `machinal-scenes init <directory>` scaffolds the quickstart without overwriting existing directories or installing tools automatically.
|
|
22
|
+
- Precompiled Go renderers and their source/notices are included for Windows x64, Linux x64, macOS x64 and macOS arm64.
|
|
23
|
+
- Explicit `setup`, `doctor` and `render` commands plus Node `renderVideo()` export real H.264 MP4 and VP9/alpha WebM, without Go or a private service on the user's machine.
|
|
24
|
+
- Pinned native-tool provisioning retains FFmpeg license/build information and verifies its published release hashes.
|
|
25
|
+
- The starter builds a dedicated capture page, separate from preview UI, and includes `npm run render`.
|
|
26
|
+
|
|
27
|
+
The private Machinal service is not included in the npm distribution. External Chrome and FFmpeg programs retain their own licenses and are provisioned separately by `setup`.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/LICENSING.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# License scope
|
|
2
|
+
|
|
3
|
+
The Apache License, Version 2.0 applies to the original `@machinal/scenes` library and renderer code in this repository: `runtime/`, `svelte/`, `node/`, `bin/`, `renderer/`, `examples/quickstart/`, `scripts/`, `tests/`, configuration and documentation. Copyright belongs to the respective contributors.
|
|
4
|
+
|
|
5
|
+
The same license covers the generated distribution in `dist/` and original-code portions of the compiled native renderers.
|
|
6
|
+
|
|
7
|
+
The native executables also contain Go standard-library and third-party code under their respective licenses, reproduced in `native/THIRD_PARTY_NOTICES.txt`. Those notices are not replaced by the Apache license for the project's original code.
|
|
8
|
+
|
|
9
|
+
Chrome/Chromium and FFmpeg are separate external programs, downloaded only by explicit `setup` or supplied by the user. They are not included in the npm tarball and are not relicensed under Apache-2.0. FFmpeg builds may be GPL/LGPL licensed; their license and build/source information are downloaded, checksum-verified and retained in the tool cache. Anyone redistributing those programs must comply with their own applicable terms.
|
|
10
|
+
|
|
11
|
+
The separate Machinal application, private services, application integration adapters and project media are not included in this repository or npm package. This license does not grant rights to those separate products or content.
|
|
12
|
+
|
|
13
|
+
Other npm dependencies retain their respective licenses. No permission to use Machinal trademarks is granted beyond the Apache License's provisions.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
@machinal/scenes
|
|
2
|
+
Copyright 2026 Catalin Flintasu.
|
|
3
|
+
|
|
4
|
+
This product includes the frame-driven scene runtime, Svelte integration and renderer
|
|
5
|
+
developed for Machinal. It is distributed under the Apache License, Version 2.0.
|
|
6
|
+
|
|
7
|
+
Third-party dependencies retain their own copyright and license notices.
|
|
8
|
+
Native executable dependency notices are provided in native/THIRD_PARTY_NOTICES.txt.
|
package/README.md
CHANGED
|
@@ -1,3 +1,184 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @machinal/scenes
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Author, preview and render frame-driven **Svelte 5**, HTML/CSS and Three.js scenes to **MP4 and WebM** with Go.
|
|
4
|
+
|
|
5
|
+
One npm package contains the runtime, Svelte integration, Node rendering API, CLI and precompiled native renderer. No private service or Go installation is required to author or export a video.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
In a Svelte 5 project with a Svelte-aware bundler, such as Vite:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
npm install @machinal/scenes
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Requires Node.js 22.12+ and Svelte 5.15+. Three.js and its public TypeScript types are installed as dependencies. There are no install scripts: Chromium and FFmpeg are downloaded only when you explicitly run `setup` or click **Download rendering tools** in the starter. The native renderer is already in the package. Run `npm install` inside a project directory, not a drive root such as `D:\`.
|
|
16
|
+
|
|
17
|
+
The library is ESM. The root and `/svelte` entrypoints contain Svelte components and runes, so they must be processed by a Svelte-aware bundler. Use `/runtime` for framework-independent code, plain Node.js imports and manifest validation.
|
|
18
|
+
|
|
19
|
+
## From a new project to an MP4
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
npx @machinal/scenes init my-scene
|
|
23
|
+
cd my-scene
|
|
24
|
+
npm install
|
|
25
|
+
npm run setup
|
|
26
|
+
npm run render
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
This creates **`scene.mp4`** and **`scene.mp4.scene.json`**, a manifest containing the output's dimensions, duration, frame count and SHA-256. `setup` is a one-time download of pinned Chrome Headless Shell and FFmpeg into a user cache; it checks that the tools execute. `npm run render` builds the scene with Vite and exports the video locally using the included renderer.
|
|
30
|
+
|
|
31
|
+
The CLI shows readable tool status and a short export summary, not the internal metadata report. For scripts that need the complete JSON result, use `npm run setup -- --json`, `npm run doctor -- --json` or `npm run render -- --json`. Progress stays on stderr; call `machinal-scenes render --json` directly for JSON-only stdout (the npm script also prints Vite build output). The Node API and saved manifests always retain the full metadata.
|
|
32
|
+
|
|
33
|
+
For the browser workflow, run `npm run dev` and open the local URL shown in the terminal:
|
|
34
|
+
|
|
35
|
+
1. **Preview**: play, pause, reset or scrub the default **1280 × 720** scene, scaled to fit the available preview space. No rendering tools are required.
|
|
36
|
+
2. **Download rendering tools**: the export panel checks the included renderer, Chrome and FFmpeg. If tools are missing, this explicit action downloads them once to your user cache. Already installed tools are marked **Ready**.
|
|
37
|
+
3. **Render MP4**: builds the current scene source and exports it locally, with visible status and renderer progress.
|
|
38
|
+
4. **Download MP4**: saves the completed video through your browser. A copy and its manifest also remain in a **local** `renders/` directory, created inside the starter next to its `package.json` when you render. For example, a starter at `D:\my-scene` saves browser exports under `D:\my-scene\renders\`. The completed export shows the full local path. Each export uses a unique filename; previous exports are preserved. Nothing is uploaded to S3 or Machinal, and the tool does not connect to your application or any Machinal project.
|
|
39
|
+
|
|
40
|
+
The browser export actions run only through the loopback Vite development server (`npm run dev`), not on a statically hosted build or `npm run preview`. They require same-origin requests; there is no cloud render service or automatic download on page load. The terminal workflow above remains available.
|
|
41
|
+
|
|
42
|
+
Edit `src/Title.svelte` to change the artwork and `scene.config.json` to change dimensions, FPS, duration, props or audio. `npm run doctor` checks rendering prerequisites without downloading anything.
|
|
43
|
+
|
|
44
|
+
The initializer refuses to overwrite an existing directory. Rendering also refuses to replace an existing video or manifest. Choose another output filename for another export:
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
npm run render -- --output second.mp4
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
The starter uses separate preview and capture pages. `scene.html` contains only the scene, so exported video does not include the preview's buttons, slider or heading.
|
|
51
|
+
|
|
52
|
+
## Your first scene
|
|
53
|
+
|
|
54
|
+
Create `Title.svelte`:
|
|
55
|
+
|
|
56
|
+
```svelte
|
|
57
|
+
<script lang="ts">
|
|
58
|
+
import { SceneCanvas, useScene, interpolate } from '@machinal/scenes';
|
|
59
|
+
|
|
60
|
+
let { title = 'Hello, scenes!' }: { title?: string } = $props();
|
|
61
|
+
const scene = useScene();
|
|
62
|
+
const x = $derived(interpolate(scene.frame.frame, [0, 60], [0, 200]));
|
|
63
|
+
</script>
|
|
64
|
+
|
|
65
|
+
<SceneCanvas background="#f5f2eb">
|
|
66
|
+
<h1 style:transform="translateX({x}px)">{title}</h1>
|
|
67
|
+
</SceneCanvas>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Mount it from your browser entrypoint:
|
|
71
|
+
|
|
72
|
+
```ts
|
|
73
|
+
import { mountSvelteScene, exposeScene, type SceneRequest } from '@machinal/scenes';
|
|
74
|
+
import Title from './Title.svelte';
|
|
75
|
+
|
|
76
|
+
const request: SceneRequest = {
|
|
77
|
+
version: 1,
|
|
78
|
+
sceneId: 'title',
|
|
79
|
+
props: { title: 'Hello, scenes!' },
|
|
80
|
+
config: { width: 1280, height: 720, fps: 30, durationInFrames: 180 },
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
const controller = mountSvelteScene(
|
|
84
|
+
Title,
|
|
85
|
+
document.getElementById('scene')!,
|
|
86
|
+
request,
|
|
87
|
+
{},
|
|
88
|
+
);
|
|
89
|
+
const disconnect = exposeScene(controller);
|
|
90
|
+
await controller.ready();
|
|
91
|
+
await controller.seek(30); // One second into the scene; indexes start at zero.
|
|
92
|
+
|
|
93
|
+
window.addEventListener('pagehide', () => {
|
|
94
|
+
disconnect();
|
|
95
|
+
void controller.dispose();
|
|
96
|
+
}, { once: true });
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Add `<div id="scene"></div>` to the page. `useScene()` and `SceneCanvas` must run inside a scene mounted with `mountSvelteScene()`; rendering them directly in an unrelated Svelte component does not establish scene context. In SvelteKit, mount from `onMount` and dispose on unmount rather than running this code during SSR.
|
|
100
|
+
|
|
101
|
+
`seek()` updates the Svelte component, seeks supported CSS animations and video, and waits for tracked resources, DOM images and fonts. Playback is driven by the host requesting frames; mounting does not automatically start a wall-clock animation.
|
|
102
|
+
|
|
103
|
+
## API map
|
|
104
|
+
|
|
105
|
+
| Import | Includes |
|
|
106
|
+
| --- | --- |
|
|
107
|
+
| `@machinal/scenes` | Runtime helpers and all Svelte components |
|
|
108
|
+
| `@machinal/scenes/runtime` | Frame/controller protocol, resources, seeded randomness, interpolation, choreography, geometry, object parameters, layout and asset-manifest validation; no Svelte or Three.js imports |
|
|
109
|
+
| `@machinal/scenes/svelte` | `mountSvelteScene`, `useScene`, `SceneCanvas`, `SceneVideo`, `SceneThree`, Three.js camera/light helpers and controlled model/texture loading |
|
|
110
|
+
| `@machinal/scenes/node` | Local `setup()`, `doctor()` and `renderVideo()`; no Svelte compilation or private service required to run a built scene |
|
|
111
|
+
|
|
112
|
+
All entrypoints belong to **one installed package**, not separate npm dependencies. Keep `/node` imports in Node/server code, not browser bundles. Internal source paths are not public entrypoints. Version `0.1.x` is an initial API; consult the changelog when upgrading.
|
|
113
|
+
|
|
114
|
+
### Three.js and media
|
|
115
|
+
|
|
116
|
+
`SceneThree` owns a Three.js renderer. Its `setup(context)` returns `update(frame)` and optional `dispose()`, synchronously or through a tracked promise. Derive transforms from absolute `frame.time`; do not accumulate deltas across seeks.
|
|
117
|
+
|
|
118
|
+
`SceneVideo` follows scene time, including backward seeks, reverse playback and freeze frames. Its media is silent: page audio is not captured by this library. Mix narration/music separately in the renderer.
|
|
119
|
+
|
|
120
|
+
For non-DOM resources, use `scene.resources.track(promise)` and honor `scene.resources.signal`. Arbitrary timers, network responses and third-party animation timelines are not made deterministic automatically. Pixel identity across browsers, operating systems and GPUs is not guaranteed.
|
|
121
|
+
|
|
122
|
+
## Local rendering
|
|
123
|
+
|
|
124
|
+
The included precompiled renderer supports **Windows x64, Linux x64, macOS x64 and macOS arm64**. The browser runtime can be used elsewhere, but native export on other targets is not supported in this release. No compilation is performed on the user's machine.
|
|
125
|
+
|
|
126
|
+
For an existing built scene project:
|
|
127
|
+
|
|
128
|
+
```sh
|
|
129
|
+
npx machinal-scenes setup
|
|
130
|
+
npx machinal-scenes render --request scene.config.json --serve dist --output output.mp4
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
The built page must mount and expose the scene controller as shown above. The request includes `url: "/scene.html"` in addition to the scene request fields. `--serve` starts an ephemeral loopback-only file server; it does not start or require the private Machinal service.
|
|
134
|
+
|
|
135
|
+
From Node:
|
|
136
|
+
|
|
137
|
+
```ts
|
|
138
|
+
import { setup, renderVideo } from '@machinal/scenes/node';
|
|
139
|
+
|
|
140
|
+
await setup(); // Explicit one-time downloads; omit after provisioning.
|
|
141
|
+
const asset = await renderVideo({
|
|
142
|
+
request: 'scene.config.json',
|
|
143
|
+
serveDirectory: 'dist',
|
|
144
|
+
output: 'output.mp4',
|
|
145
|
+
onProgress: message => process.stderr.write(message),
|
|
146
|
+
});
|
|
147
|
+
console.log(asset.file, asset.sha256);
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
`request` accepts a JSON/YAML filename or a `RenderRequest` object. Audio filenames in request files resolve relative to that file; object audio paths resolve relative to the working directory. Audio is mixed by FFmpeg, not captured from the browser.
|
|
151
|
+
|
|
152
|
+
For real alpha, set `config.transparent: true` and choose a `.webm` output. The renderer uses VP9 alpha; MP4 output is opaque H.264. `--lossless`, `--workers` and `--gpu` are available; run `npx machinal-scenes render --help` for options.
|
|
153
|
+
|
|
154
|
+
`setup` pins Chrome Headless Shell `151.0.7922.34` from Chrome for Testing and FFmpeg release `b6.1.1` from `eugeneware/ffmpeg-static`. FFmpeg archives, licenses and build information are checked against pinned SHA-256 values; native renderer binaries are checked against the packaged manifest. Browser downloads use the official HTTPS distribution and a fixed version; no independent browser checksum is asserted. FFmpeg's license and build/source information are retained beside the cached executable.
|
|
155
|
+
|
|
156
|
+
Use `--cache-dir` or `MACHINAL_SCENES_CACHE` to select another cache. Existing tools can be supplied with absolute `--browser`/`--ffmpeg` paths, the `SCENE_BROWSER`/`SCENE_FFMPEG` environment variables, or the Node API's `browserExecutable`/`ffmpegExecutable` options. Custom browser/tool versions are your compatibility responsibility.
|
|
157
|
+
|
|
158
|
+
Linux requires glibc, `unzip`, and Chromium's system libraries (NSS, ATK, X11, GBM, ALSA and related dependencies); minimal containers must provision them first. Windows uses its built-in `tar.exe` for browser extraction; macOS needs `unzip`. `setup` never runs privileged package-manager commands. Run as a non-root user to retain normal Chromium sandbox behavior. `--no-sandbox` is for externally isolated containers; the underlying chromedp allocator also disables the sandbox when launched as root.
|
|
159
|
+
|
|
160
|
+
Scenes are executable code, not a security sandbox. Use trusted scenes or provide your own execution isolation, authorization and resource limits.
|
|
161
|
+
|
|
162
|
+
## VS Code reports missing children or rejects onclick
|
|
163
|
+
|
|
164
|
+
These two diagnostics can appear together when the Svelte extension is running in **Restricted Mode**:
|
|
165
|
+
|
|
166
|
+
```text
|
|
167
|
+
Property 'children' is missing in type '{ background: string; }'
|
|
168
|
+
'"onclick"' does not exist in type 'HTMLProps<"button", HTMLAttributes<any>>'
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
In an untrusted workspace, the extension avoids loading the project's local compiler and can fall back to its bundled Svelte 4 compiler/types. The starter uses Svelte 5: nested component content supplies the `children` snippet, and `onclick` is a supported button attribute.
|
|
172
|
+
|
|
173
|
+
Open the generated starter directory itself in VS Code and run `npm install` there. If you have reviewed and trust its code, use **Workspaces: Manage Workspace Trust** to trust only that folder, then **Svelte: Restart Language Server**. Do not disable Workspace Trust globally. You can also validate the project independently of the editor:
|
|
174
|
+
|
|
175
|
+
```sh
|
|
176
|
+
npm run check
|
|
177
|
+
npm ls svelte
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
With the local Svelte 5 compiler, these starter components should pass the check. If the terminal also reports errors, investigate those diagnostics and the installed dependency versions rather than treating them as an editor-only issue. Do not make `SceneCanvas.children` optional or replace Svelte 5 event handlers just to suppress a mismatched editor diagnostic.
|
|
181
|
+
|
|
182
|
+
## License
|
|
183
|
+
|
|
184
|
+
Apache-2.0 for the library and renderer sources. See [LICENSE](LICENSE), [NOTICE](NOTICE), [LICENSING.md](LICENSING.md) and the included native third-party notices. Downloaded Chrome/FFmpeg and dependencies retain their own licenses; in particular, the downloaded FFmpeg builds have separate GPL/LGPL terms. This package license does not relicense those tools, the surrounding Machinal application or its private services.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { cp, mkdir, readFile, rename } from 'node:fs/promises';
|
|
3
|
+
import { join, resolve } from 'node:path';
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
5
|
+
import { parseArgs } from 'node:util';
|
|
6
|
+
import { doctor, renderVideo, setup } from '../node/index.mjs';
|
|
7
|
+
import { formatRenderResult, formatToolchainStatus } from '../node/cli-output.mjs';
|
|
8
|
+
|
|
9
|
+
const help = `@machinal/scenes
|
|
10
|
+
|
|
11
|
+
Usage:
|
|
12
|
+
machinal-scenes init <directory> Create a standalone Svelte/Vite scene project
|
|
13
|
+
machinal-scenes setup Install pinned Chromium and FFmpeg once
|
|
14
|
+
machinal-scenes doctor Check the packaged renderer and local tools
|
|
15
|
+
machinal-scenes render Render scene.config.json + dist/ to scene.mp4
|
|
16
|
+
machinal-scenes --version Print the installed version
|
|
17
|
+
machinal-scenes --help Show this help
|
|
18
|
+
|
|
19
|
+
Render options:
|
|
20
|
+
--request <file> JSON/YAML request (default: scene.config.json)
|
|
21
|
+
--serve <dir> Built scene directory (default: dist)
|
|
22
|
+
--output <file> New MP4/WebM filename (default: scene.mp4)
|
|
23
|
+
--workers <1-16> Frame-capture workers (default: 2)
|
|
24
|
+
--lossless Lossless intermediate encoding
|
|
25
|
+
--gpu Enable hardware GPU rendering
|
|
26
|
+
--no-sandbox Explicitly disable Chromium sandbox (isolated containers only)
|
|
27
|
+
|
|
28
|
+
Setup/doctor/render options:
|
|
29
|
+
--json Print complete metadata instead of a readable summary
|
|
30
|
+
--browser <file> Use an existing Chrome/Chromium executable
|
|
31
|
+
--ffmpeg <file> Use an existing FFmpeg executable
|
|
32
|
+
--cache-dir <dir> Override the native-tool cache
|
|
33
|
+
|
|
34
|
+
Only setup downloads tools. Rendering is local and requires no Go installation,
|
|
35
|
+
Machinal account, API key or private service. Existing output files are never replaced.
|
|
36
|
+
`;
|
|
37
|
+
|
|
38
|
+
async function run(args) {
|
|
39
|
+
if (args.length === 0 || args.length === 1 && ['--help', '-h'].includes(args[0])) {
|
|
40
|
+
console.log(help);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
if (args.length === 1 && ['--version', '-v'].includes(args[0])) {
|
|
44
|
+
const manifest = JSON.parse(await readFile(new URL('../package.json', import.meta.url), 'utf8'));
|
|
45
|
+
console.log(manifest.version);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
if (['setup', 'doctor', 'render'].includes(args[0])) {
|
|
49
|
+
await runTools(args[0], args.slice(1));
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
if (args.length !== 2 || args[0] !== 'init' || !args[1].trim() || args[1].startsWith('-')) throw new Error(`Expected a supported command.\n\n${help}`);
|
|
53
|
+
|
|
54
|
+
const destination = resolve(args[1]);
|
|
55
|
+
try {
|
|
56
|
+
await mkdir(destination);
|
|
57
|
+
} catch (error) {
|
|
58
|
+
if (error.code === 'EEXIST') throw new Error(`Destination already exists: ${destination}. No files were changed.`);
|
|
59
|
+
throw error;
|
|
60
|
+
}
|
|
61
|
+
await cp(fileURLToPath(new URL('../examples/quickstart/', import.meta.url)), destination, {
|
|
62
|
+
recursive: true, errorOnExist: true, force: false,
|
|
63
|
+
});
|
|
64
|
+
await rename(join(destination, 'gitignore'), join(destination, '.gitignore'));
|
|
65
|
+
console.log(`Created ${destination}\n\nOpen this directory, then run:\n npm install\n npm run dev\n\nIn the browser, use Download rendering tools (once), Render MP4, then Download MP4.\n\nTerminal alternative:\n npm run setup\n npm run render`);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
async function runTools(command, args) {
|
|
69
|
+
const common = { help: { type: 'boolean' }, json: { type: 'boolean' }, browser: { type: 'string' }, ffmpeg: { type: 'string' }, 'cache-dir': { type: 'string' } };
|
|
70
|
+
const rendering = { request: { type: 'string' }, serve: { type: 'string' }, output: { type: 'string' }, workers: { type: 'string' }, lossless: { type: 'boolean' }, gpu: { type: 'boolean' }, 'no-sandbox': { type: 'boolean' } };
|
|
71
|
+
const { values } = parseArgs({ args, options: { ...common, ...(command === 'render' ? rendering : {}) }, strict: true, allowPositionals: false });
|
|
72
|
+
if (values.help) { console.log(help); return; }
|
|
73
|
+
const options = { browserExecutable: values.browser, ffmpegExecutable: values.ffmpeg, cacheDirectory: values['cache-dir'] };
|
|
74
|
+
if (command === 'render') {
|
|
75
|
+
const result = await renderVideo({ ...options, request: values.request ?? 'scene.config.json', serveDirectory: values.serve ?? 'dist', output: values.output ?? 'scene.mp4', workers: values.workers === undefined ? undefined : Number(values.workers), lossless: values.lossless, gpu: values.gpu, noSandbox: values['no-sandbox'], onProgress: message => process.stderr.write(message) });
|
|
76
|
+
console.log(values.json ? JSON.stringify(result, null, 2) : formatRenderResult(result));
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
const result = command === 'setup' ? await setup({ ...options, onProgress: message => console.error(message) }) : await doctor(options);
|
|
80
|
+
console.log(values.json ? JSON.stringify(result, null, 2) : formatToolchainStatus(result));
|
|
81
|
+
if (!result.ready) process.exitCode = 1;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
try {
|
|
85
|
+
await run(process.argv.slice(2));
|
|
86
|
+
} catch (error) {
|
|
87
|
+
console.error(error instanceof Error ? error.message : String(error));
|
|
88
|
+
process.exitCode = 1;
|
|
89
|
+
}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { SceneManifest } from './types.js';
|
|
2
|
+
export interface RenderedSceneAsset {
|
|
3
|
+
version: 1;
|
|
4
|
+
file: string;
|
|
5
|
+
sha256: string;
|
|
6
|
+
size: number;
|
|
7
|
+
duration: number;
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
fps: number;
|
|
11
|
+
frames: number;
|
|
12
|
+
hasAudio: boolean;
|
|
13
|
+
transparent: boolean;
|
|
14
|
+
codec: 'h264' | 'vp9';
|
|
15
|
+
scene: SceneManifest;
|
|
16
|
+
elapsedNanoseconds: number;
|
|
17
|
+
}
|
|
18
|
+
export declare function parseRenderedSceneAsset(value: unknown): RenderedSceneAsset;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { validateRequest } from './validation.js';
|
|
2
|
+
export function parseRenderedSceneAsset(value) {
|
|
3
|
+
if (!value || typeof value !== 'object')
|
|
4
|
+
throw new Error('Scene asset manifest must be an object');
|
|
5
|
+
const asset = value;
|
|
6
|
+
if (asset.version !== 1 || typeof asset.file !== 'string' || !asset.file.trim())
|
|
7
|
+
throw new Error('Invalid scene asset identity');
|
|
8
|
+
if (typeof asset.sha256 !== 'string' || !/^[a-f0-9]{64}$/.test(asset.sha256))
|
|
9
|
+
throw new Error('Invalid scene asset SHA-256');
|
|
10
|
+
if (!Number.isSafeInteger(asset.size) || asset.size <= 0)
|
|
11
|
+
throw new Error('Invalid scene asset size');
|
|
12
|
+
if (asset.codec !== 'h264' && asset.codec !== 'vp9')
|
|
13
|
+
throw new Error('Unsupported scene asset codec');
|
|
14
|
+
if (typeof asset.hasAudio !== 'boolean' || typeof asset.transparent !== 'boolean')
|
|
15
|
+
throw new Error('Invalid scene asset media flags');
|
|
16
|
+
validateRequest(asset.scene);
|
|
17
|
+
const config = asset.scene.config;
|
|
18
|
+
if (asset.width !== config.width || asset.height !== config.height || asset.fps !== config.fps || asset.frames !== config.durationInFrames || asset.transparent !== Boolean(config.transparent)) {
|
|
19
|
+
throw new Error('Scene asset dimensions or timing do not match its scene');
|
|
20
|
+
}
|
|
21
|
+
if (!Number.isFinite(asset.duration) || Math.abs(asset.duration - asset.frames / asset.fps) > 0.000001)
|
|
22
|
+
throw new Error('Invalid scene asset duration');
|
|
23
|
+
if (asset.transparent && asset.codec !== 'vp9')
|
|
24
|
+
throw new Error('Transparent scenes require VP9');
|
|
25
|
+
return structuredClone(asset);
|
|
26
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SceneController, SceneManifest } from './types.js';
|
|
2
|
+
export declare function exposeScene(controller: SceneController, view?: Window): () => void;
|
|
3
|
+
export interface SceneConnection {
|
|
4
|
+
ready: () => Promise<SceneManifest>;
|
|
5
|
+
seek: (frame: number) => Promise<SceneManifest>;
|
|
6
|
+
dispose: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function connectScene(iframe: HTMLIFrameElement, timeoutMs?: number): SceneConnection;
|