multiplane 0.3.3 → 0.3.7
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 +202 -202
- package/README.en.md +327 -326
- package/README.md +327 -326
- package/THIRD_PARTY_NOTICES.md +30 -30
- package/examples/alpha.html +18 -18
- package/examples/animation.html +17 -17
- package/examples/assets/OFL.txt +93 -93
- package/examples/assets/card.svg +6 -6
- package/examples/three-cards.html +17 -17
- package/examples/typography.html +17 -17
- package/licenses/GPL-3.0.txt +232 -232
- package/licenses/LGPL-3.0.txt +304 -304
- package/licenses/acorn-LICENSE +21 -21
- package/licenses/colour-LICENSE.md +82 -82
- package/licenses/detect-libc-LICENSE +201 -201
- package/licenses/entities-LICENSE +11 -11
- package/licenses/nanoid-LICENSE +20 -20
- package/licenses/parse5-LICENSE +19 -19
- package/licenses/picocolors-LICENSE +15 -15
- package/licenses/playwright-NOTICE +5 -5
- package/licenses/playwright-ThirdPartyNotices.txt +14 -14
- package/licenses/playwright-core-ThirdPartyNotices.txt +13 -13
- package/licenses/postcss-LICENSE +20 -20
- package/licenses/postcss-value-parser-LICENSE +22 -22
- package/licenses/semver-LICENSE +15 -15
- package/licenses/sharp-LICENSE +191 -191
- package/licenses/sharp-win32-x64-NOTICES.md +45 -45
- package/licenses/source-map-js-LICENSE +28 -28
- package/licenses/three-LICENSE +21 -21
- package/package.json +1 -1
- package/skills/multiplane/SKILL.md +215 -213
- package/src/alpha.mjs +69 -69
- package/src/artifacts.mjs +61 -61
- package/src/browser-recovery.mjs +26 -26
- package/src/capture.mjs +16 -6
- package/src/encoder.mjs +16 -16
- package/src/environment.mjs +56 -56
- package/src/events.mjs +3 -0
- package/src/ffmpeg.mjs +32 -32
- package/src/format.mjs +27 -27
- package/src/frame-rate.mjs +28 -28
- package/src/home-migration.mjs +54 -54
- package/src/hosted.mjs +1 -1
- package/src/lint.mjs +248 -248
- package/src/output-alpha.mjs +36 -36
- package/src/output-check.mjs +110 -110
- package/src/platform.mjs +114 -114
- package/src/png-native.mjs +12 -12
- package/src/png.mjs +74 -74
- package/src/post.mjs +55 -21
- package/src/preview.mjs +23 -23
- package/src/process.mjs +9 -9
- package/src/render-pool.mjs +16 -6
- package/src/render-worker.mjs +5 -3
- package/src/render.mjs +5 -5
- package/src/resource-path.mjs +29 -29
- package/src/resources.mjs +27 -27
- package/src/runtime/camera.js +37 -37
- package/src/runtime/shot.css +9 -9
- package/src/server.mjs +7 -1
- package/src/setup.mjs +51 -51
- package/src/skills.mjs +128 -128
- package/src/stills.mjs +5 -4
- package/src/three/index.js +44 -14
- package/src/verify.mjs +3 -1
- package/src/video-pipe.mjs +6 -6
- package/src/workers.mjs +5 -1
- package/tools/bench/shots/canvas-2d.html +1 -1
- package/tools/bench/shots/dom-light.html +1 -1
- package/tools/bench/shots/scene.js +44 -44
- package/tools/bench/shots/webgl.html +1 -1
- package/tools/install-browser.mjs +18 -18
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
# 第三方声明
|
|
2
|
-
|
|
3
|
-
Multiplane 使用以下依赖;它们保留各自的版权和许可,不因本项目的 Apache-2.0 许可而改变。
|
|
4
|
-
|
|
5
|
-
| 组件 | 本次锁定版本 | 许可与原文 | 用途 |
|
|
6
|
-
|---|---|---|---|
|
|
7
|
-
| [Playwright](https://github.com/microsoft/playwright) / playwright-core | 1.63.0 | Apache-2.0:[LICENSE](licenses/playwright-LICENSE)、[NOTICE](licenses/playwright-NOTICE)、[Playwright 第三方声明](licenses/playwright-ThirdPartyNotices.txt)、[core 第三方声明](licenses/playwright-core-ThirdPartyNotices.txt) | 安装和控制 Chromium |
|
|
8
|
-
| [sharp](https://github.com/lovell/sharp) | 0.35.5 | Apache-2.0:[LICENSE](licenses/sharp-LICENSE) | PNG 解码和缩放 |
|
|
9
|
-
| sharp Windows x64 原生依赖 | 0.35.5 | Apache-2.0 AND LGPL-3.0-or-later:[包许可](licenses/sharp-win32-x64-LICENSE)、[上游第三方组件声明](licenses/sharp-win32-x64-NOTICES.md)、[LGPLv3](licenses/LGPL-3.0.txt)、[GPLv3](licenses/GPL-3.0.txt) | 原生图像处理,包含 libvips 等组件 |
|
|
10
|
-
| [three.js](https://github.com/mrdoob/three.js) | 0.180.0 | MIT:[LICENSE](licenses/three-LICENSE) | 可选三维层 |
|
|
11
|
-
| @img/colour | 随 lockfile 固定 | MIT:[LICENSE](licenses/colour-LICENSE.md) | sharp 间接依赖 |
|
|
12
|
-
| detect-libc | 随 lockfile 固定 | Apache-2.0:[LICENSE](licenses/detect-libc-LICENSE) | sharp 平台检测 |
|
|
13
|
-
| semver | 随 lockfile 固定 | ISC:[LICENSE](licenses/semver-LICENSE) | 版本解析 |
|
|
14
|
-
| Roboto 可变字体 | Google Fonts 原始 TTF | SIL OFL 1.1:[OFL 原文](examples/assets/OFL.txt) | 文字示例 |
|
|
15
|
-
| [Acorn](https://github.com/acornjs/acorn) | 8.15.0 | MIT:[LICENSE](licenses/acorn-LICENSE) | JavaScript 静态语法与位置解析 |
|
|
16
|
-
| [parse5](https://github.com/inikulin/parse5) | 7.3.0 | MIT:[LICENSE](licenses/parse5-LICENSE) | HTML 元素、属性和内联源码位置解析 |
|
|
17
|
-
| [PostCSS](https://github.com/postcss/postcss) | 8.5.28 | MIT:[LICENSE](licenses/postcss-LICENSE) | CSS 规则与声明解析;禁用 source map 读取 |
|
|
18
|
-
| [postcss-value-parser](https://github.com/TrySound/postcss-value-parser) | 4.2.0 | MIT:[LICENSE](licenses/postcss-value-parser-LICENSE) | CSS 资源 URL 与字符串解析 |
|
|
19
|
-
| entities | 6.0.1 | BSD-2-Clause:[LICENSE](licenses/entities-LICENSE) | parse5 间接依赖,HTML 实体解码 |
|
|
20
|
-
| nanoid | 3.3.19 | MIT:[LICENSE](licenses/nanoid-LICENSE) | PostCSS 间接依赖 |
|
|
21
|
-
| picocolors | 1.1.1 | ISC:[LICENSE](licenses/picocolors-LICENSE) | PostCSS 间接依赖,诊断颜色工具 |
|
|
22
|
-
| source-map-js | 1.2.2 | BSD-3-Clause:[LICENSE](licenses/source-map-js-LICENSE) | PostCSS 间接依赖,source map 工具 |
|
|
23
|
-
|
|
24
|
-
Roboto 文件从 [Google Fonts 的 Roboto 目录](https://github.com/google/fonts/tree/main/ofl/roboto) 获取,文件名为 `Roboto[wdth,wght].ttf`,本仓库仅将文件名改为 `Roboto-Variable.ttf`,未修改字体内容。Copyright 2011 The Roboto Project Authors。许可原文随字体保存。
|
|
25
|
-
|
|
26
|
-
`examples/assets/card.svg` 为本项目自行绘制的几何图形,采用本项目 Apache-2.0 许可。
|
|
27
|
-
|
|
28
|
-
Chromium 由 Playwright 安装或复用本机已安装的对应版本,不放入 Multiplane 包。其自身声明随浏览器发行物提供。不同平台的 sharp 原生依赖由 npm 按平台安装,不重打包进 Multiplane;应保留对应包内的许可和声明。上表原生依赖副本对应当前验收的 Windows x64 平台;其第三方库清单和使用许可详见上游声明,源码与构建信息见 [sharp-libvips](https://github.com/lovell/sharp-libvips)。Playwright 的内嵌依赖另在其安装包内 `*.js.LICENSE` 文件中声明。
|
|
29
|
-
|
|
30
|
-
本包不包含 FFmpeg 二进制,也不依赖 `ffmpeg-static`。使用方通过命令行、环境变量或 PATH 提供 FFmpeg;其具体构建的许可与功能以该发行物为准。
|
|
1
|
+
# 第三方声明
|
|
2
|
+
|
|
3
|
+
Multiplane 使用以下依赖;它们保留各自的版权和许可,不因本项目的 Apache-2.0 许可而改变。
|
|
4
|
+
|
|
5
|
+
| 组件 | 本次锁定版本 | 许可与原文 | 用途 |
|
|
6
|
+
|---|---|---|---|
|
|
7
|
+
| [Playwright](https://github.com/microsoft/playwright) / playwright-core | 1.63.0 | Apache-2.0:[LICENSE](licenses/playwright-LICENSE)、[NOTICE](licenses/playwright-NOTICE)、[Playwright 第三方声明](licenses/playwright-ThirdPartyNotices.txt)、[core 第三方声明](licenses/playwright-core-ThirdPartyNotices.txt) | 安装和控制 Chromium |
|
|
8
|
+
| [sharp](https://github.com/lovell/sharp) | 0.35.5 | Apache-2.0:[LICENSE](licenses/sharp-LICENSE) | PNG 解码和缩放 |
|
|
9
|
+
| sharp Windows x64 原生依赖 | 0.35.5 | Apache-2.0 AND LGPL-3.0-or-later:[包许可](licenses/sharp-win32-x64-LICENSE)、[上游第三方组件声明](licenses/sharp-win32-x64-NOTICES.md)、[LGPLv3](licenses/LGPL-3.0.txt)、[GPLv3](licenses/GPL-3.0.txt) | 原生图像处理,包含 libvips 等组件 |
|
|
10
|
+
| [three.js](https://github.com/mrdoob/three.js) | 0.180.0 | MIT:[LICENSE](licenses/three-LICENSE) | 可选三维层 |
|
|
11
|
+
| @img/colour | 随 lockfile 固定 | MIT:[LICENSE](licenses/colour-LICENSE.md) | sharp 间接依赖 |
|
|
12
|
+
| detect-libc | 随 lockfile 固定 | Apache-2.0:[LICENSE](licenses/detect-libc-LICENSE) | sharp 平台检测 |
|
|
13
|
+
| semver | 随 lockfile 固定 | ISC:[LICENSE](licenses/semver-LICENSE) | 版本解析 |
|
|
14
|
+
| Roboto 可变字体 | Google Fonts 原始 TTF | SIL OFL 1.1:[OFL 原文](examples/assets/OFL.txt) | 文字示例 |
|
|
15
|
+
| [Acorn](https://github.com/acornjs/acorn) | 8.15.0 | MIT:[LICENSE](licenses/acorn-LICENSE) | JavaScript 静态语法与位置解析 |
|
|
16
|
+
| [parse5](https://github.com/inikulin/parse5) | 7.3.0 | MIT:[LICENSE](licenses/parse5-LICENSE) | HTML 元素、属性和内联源码位置解析 |
|
|
17
|
+
| [PostCSS](https://github.com/postcss/postcss) | 8.5.28 | MIT:[LICENSE](licenses/postcss-LICENSE) | CSS 规则与声明解析;禁用 source map 读取 |
|
|
18
|
+
| [postcss-value-parser](https://github.com/TrySound/postcss-value-parser) | 4.2.0 | MIT:[LICENSE](licenses/postcss-value-parser-LICENSE) | CSS 资源 URL 与字符串解析 |
|
|
19
|
+
| entities | 6.0.1 | BSD-2-Clause:[LICENSE](licenses/entities-LICENSE) | parse5 间接依赖,HTML 实体解码 |
|
|
20
|
+
| nanoid | 3.3.19 | MIT:[LICENSE](licenses/nanoid-LICENSE) | PostCSS 间接依赖 |
|
|
21
|
+
| picocolors | 1.1.1 | ISC:[LICENSE](licenses/picocolors-LICENSE) | PostCSS 间接依赖,诊断颜色工具 |
|
|
22
|
+
| source-map-js | 1.2.2 | BSD-3-Clause:[LICENSE](licenses/source-map-js-LICENSE) | PostCSS 间接依赖,source map 工具 |
|
|
23
|
+
|
|
24
|
+
Roboto 文件从 [Google Fonts 的 Roboto 目录](https://github.com/google/fonts/tree/main/ofl/roboto) 获取,文件名为 `Roboto[wdth,wght].ttf`,本仓库仅将文件名改为 `Roboto-Variable.ttf`,未修改字体内容。Copyright 2011 The Roboto Project Authors。许可原文随字体保存。
|
|
25
|
+
|
|
26
|
+
`examples/assets/card.svg` 为本项目自行绘制的几何图形,采用本项目 Apache-2.0 许可。
|
|
27
|
+
|
|
28
|
+
Chromium 由 Playwright 安装或复用本机已安装的对应版本,不放入 Multiplane 包。其自身声明随浏览器发行物提供。不同平台的 sharp 原生依赖由 npm 按平台安装,不重打包进 Multiplane;应保留对应包内的许可和声明。上表原生依赖副本对应当前验收的 Windows x64 平台;其第三方库清单和使用许可详见上游声明,源码与构建信息见 [sharp-libvips](https://github.com/lovell/sharp-libvips)。Playwright 的内嵌依赖另在其安装包内 `*.js.LICENSE` 文件中声明。
|
|
29
|
+
|
|
30
|
+
本包不包含 FFmpeg 二进制,也不依赖 `ffmpeg-static`。使用方通过命令行、环境变量或 PATH 提供 FFmpeg;其具体构建的许可与功能以该发行物为准。
|
package/examples/alpha.html
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en"><meta charset="utf-8"><title>Alpha example</title>
|
|
3
|
-
<link rel="stylesheet" href="/multiplane/runtime/shot.css">
|
|
4
|
-
<style>
|
|
5
|
-
@font-face{font-family:Example;src:url('./assets/Roboto-Variable.ttf')}
|
|
6
|
-
#stage{width:320px;height:180px;background:transparent}
|
|
7
|
-
#block{position:absolute;top:65px;width:60px;height:60px;background:rgba(40,120,220,.5)}
|
|
8
|
-
#label{position:absolute;left:24px;top:20px;color:rgba(230,70,30,.8);font:28px Example,sans-serif}
|
|
9
|
-
</style>
|
|
10
|
-
<div id="stage"><div id="block"></div><div id="label">Alpha</div></div>
|
|
11
|
-
<script src="/multiplane/runtime/shot.js"></script>
|
|
12
|
-
<script>
|
|
13
|
-
// TODO(design): Review the neutral alpha example before publication.
|
|
14
|
-
const block = document.querySelector('#block');
|
|
15
|
-
Shot.define({duration:2,fps:12,fonts:[['28px Example','Alpha']],post:{alpha:true,motionBlur:5,shutter:0.8},
|
|
16
|
-
render(t){block.style.transform=`translateX(${24+90*t}px)`;}
|
|
17
|
-
});
|
|
18
|
-
</script></html>
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en"><meta charset="utf-8"><title>Alpha example</title>
|
|
3
|
+
<link rel="stylesheet" href="/multiplane/runtime/shot.css">
|
|
4
|
+
<style>
|
|
5
|
+
@font-face{font-family:Example;src:url('./assets/Roboto-Variable.ttf')}
|
|
6
|
+
#stage{width:320px;height:180px;background:transparent}
|
|
7
|
+
#block{position:absolute;top:65px;width:60px;height:60px;background:rgba(40,120,220,.5)}
|
|
8
|
+
#label{position:absolute;left:24px;top:20px;color:rgba(230,70,30,.8);font:28px Example,sans-serif}
|
|
9
|
+
</style>
|
|
10
|
+
<div id="stage"><div id="block"></div><div id="label">Alpha</div></div>
|
|
11
|
+
<script src="/multiplane/runtime/shot.js"></script>
|
|
12
|
+
<script>
|
|
13
|
+
// TODO(design): Review the neutral alpha example before publication.
|
|
14
|
+
const block = document.querySelector('#block');
|
|
15
|
+
Shot.define({duration:2,fps:12,fonts:[['28px Example','Alpha']],post:{alpha:true,motionBlur:5,shutter:0.8},
|
|
16
|
+
render(t){block.style.transform=`translateX(${24+90*t}px)`;}
|
|
17
|
+
});
|
|
18
|
+
</script></html>
|
package/examples/animation.html
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en"><meta charset="utf-8"><title>Geometry</title>
|
|
3
|
-
<link rel="stylesheet" href="/multiplane/runtime/shot.css">
|
|
4
|
-
<style>#stage{width:640px;height:360px}#shape{position:absolute;top:140px;width:80px;height:80px;background:#888}</style>
|
|
5
|
-
<div id="stage"><div id="shape"></div></div>
|
|
6
|
-
<script src="/multiplane/runtime/shot.js"></script>
|
|
7
|
-
<script>
|
|
8
|
-
// TODO(design): Review the neutral examples before publication.
|
|
9
|
-
const stage = document.querySelector('#stage'), shape = document.querySelector('#shape');
|
|
10
|
-
Shot.define({ duration: 2, fps: 12, cuts: [1], post: { motionBlur: 5, shutter: 0.8, grain: 0 },
|
|
11
|
-
render(t) {
|
|
12
|
-
stage.style.background = t < 1 ? '#eee' : '#222';
|
|
13
|
-
shape.style.borderRadius = t < 1 ? '0' : '50%';
|
|
14
|
-
shape.style.transform = `translateX(${40 + 480 * (t < 1 ? t : t - 1)}px)`;
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
</script></html>
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en"><meta charset="utf-8"><title>Geometry</title>
|
|
3
|
+
<link rel="stylesheet" href="/multiplane/runtime/shot.css">
|
|
4
|
+
<style>#stage{width:640px;height:360px}#shape{position:absolute;top:140px;width:80px;height:80px;background:#888}</style>
|
|
5
|
+
<div id="stage"><div id="shape"></div></div>
|
|
6
|
+
<script src="/multiplane/runtime/shot.js"></script>
|
|
7
|
+
<script>
|
|
8
|
+
// TODO(design): Review the neutral examples before publication.
|
|
9
|
+
const stage = document.querySelector('#stage'), shape = document.querySelector('#shape');
|
|
10
|
+
Shot.define({ duration: 2, fps: 12, cuts: [1], post: { motionBlur: 5, shutter: 0.8, grain: 0 },
|
|
11
|
+
render(t) {
|
|
12
|
+
stage.style.background = t < 1 ? '#eee' : '#222';
|
|
13
|
+
shape.style.borderRadius = t < 1 ? '0' : '50%';
|
|
14
|
+
shape.style.transform = `translateX(${40 + 480 * (t < 1 ? t : t - 1)}px)`;
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
</script></html>
|
package/examples/assets/OFL.txt
CHANGED
|
@@ -1,93 +1,93 @@
|
|
|
1
|
-
Copyright 2011 The Roboto Project Authors (https://github.com/googlefonts/roboto-classic)
|
|
2
|
-
|
|
3
|
-
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
-
This license is copied below, and is also available with a FAQ at:
|
|
5
|
-
https://openfontlicense.org
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
-----------------------------------------------------------
|
|
9
|
-
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
-
-----------------------------------------------------------
|
|
11
|
-
|
|
12
|
-
PREAMBLE
|
|
13
|
-
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
-
development of collaborative font projects, to support the font creation
|
|
15
|
-
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
-
open framework in which fonts may be shared and improved in partnership
|
|
17
|
-
with others.
|
|
18
|
-
|
|
19
|
-
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
-
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
-
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
-
redistributed and/or sold with any software provided that any reserved
|
|
23
|
-
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
-
however, cannot be released under any other type of license. The
|
|
25
|
-
requirement for fonts to remain under this license does not apply
|
|
26
|
-
to any document created using the fonts or their derivatives.
|
|
27
|
-
|
|
28
|
-
DEFINITIONS
|
|
29
|
-
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
-
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
-
include source files, build scripts and documentation.
|
|
32
|
-
|
|
33
|
-
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
-
copyright statement(s).
|
|
35
|
-
|
|
36
|
-
"Original Version" refers to the collection of Font Software components as
|
|
37
|
-
distributed by the Copyright Holder(s).
|
|
38
|
-
|
|
39
|
-
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
-
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
-
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
-
new environment.
|
|
43
|
-
|
|
44
|
-
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
-
writer or other person who contributed to the Font Software.
|
|
46
|
-
|
|
47
|
-
PERMISSION & CONDITIONS
|
|
48
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
-
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
-
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
-
Software, subject to the following conditions:
|
|
52
|
-
|
|
53
|
-
1) Neither the Font Software nor any of its individual components,
|
|
54
|
-
in Original or Modified Versions, may be sold by itself.
|
|
55
|
-
|
|
56
|
-
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
-
redistributed and/or sold with any software, provided that each copy
|
|
58
|
-
contains the above copyright notice and this license. These can be
|
|
59
|
-
included either as stand-alone text files, human-readable headers or
|
|
60
|
-
in the appropriate machine-readable metadata fields within text or
|
|
61
|
-
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
-
|
|
63
|
-
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
-
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
-
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
-
presented to the users.
|
|
67
|
-
|
|
68
|
-
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
-
Software shall not be used to promote, endorse or advertise any
|
|
70
|
-
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
-
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
-
permission.
|
|
73
|
-
|
|
74
|
-
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
-
must be distributed entirely under this license, and must not be
|
|
76
|
-
distributed under any other license. The requirement for fonts to
|
|
77
|
-
remain under this license does not apply to any document created
|
|
78
|
-
using the Font Software.
|
|
79
|
-
|
|
80
|
-
TERMINATION
|
|
81
|
-
This license becomes null and void if any of the above conditions are
|
|
82
|
-
not met.
|
|
83
|
-
|
|
84
|
-
DISCLAIMER
|
|
85
|
-
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
-
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
-
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
-
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
-
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
-
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
-
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
1
|
+
Copyright 2011 The Roboto Project Authors (https://github.com/googlefonts/roboto-classic)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
https://openfontlicense.org
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
package/examples/assets/card.svg
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="256" viewBox="0 0 256 256">
|
|
2
|
-
<rect width="256" height="256" fill="#f4f4f4"/>
|
|
3
|
-
<rect x="32" y="32" width="80" height="80" fill="#444"/>
|
|
4
|
-
<circle cx="184" cy="72" r="40" fill="#999"/>
|
|
5
|
-
<path d="M32 152h192M32 184h192M32 216h128" stroke="#666" stroke-width="8"/>
|
|
6
|
-
</svg>
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="256" viewBox="0 0 256 256">
|
|
2
|
+
<rect width="256" height="256" fill="#f4f4f4"/>
|
|
3
|
+
<rect x="32" y="32" width="80" height="80" fill="#444"/>
|
|
4
|
+
<circle cx="184" cy="72" r="40" fill="#999"/>
|
|
5
|
+
<path d="M32 152h192M32 184h192M32 216h128" stroke="#666" stroke-width="8"/>
|
|
6
|
+
</svg>
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en"><meta charset="utf-8"><title>Cards</title>
|
|
3
|
-
<link rel="stylesheet" href="/multiplane/runtime/shot.css">
|
|
4
|
-
<style>#stage{width:640px;height:360px;background:#ddd}</style>
|
|
5
|
-
<script type="importmap">{"imports":{"three":"/multiplane/vendor/three/build/three.module.js","three/addons/":"/multiplane/vendor/three/examples/jsm/"}}</script>
|
|
6
|
-
<div id="stage"></div>
|
|
7
|
-
<script src="/multiplane/runtime/shot.js"></script>
|
|
8
|
-
<script type="module">
|
|
9
|
-
import { createThreeLayer } from '/multiplane/three.js';
|
|
10
|
-
const layer = createThreeLayer({ samples: 16, maxSamples: 64, aperture: 0.12, focusDistance: 10 });
|
|
11
|
-
const cards = [-2, 0, 2].map((z, i) => layer.card({ src: './assets/card.svg', width: 2.5, height: 2.5,
|
|
12
|
-
position: [(i - 1) * 2.3, 0, z], rotation: [0, (i - 1) * 0.2, 0] }));
|
|
13
|
-
window.EXAMPLE_LAYER = layer;
|
|
14
|
-
Shot.define({ duration: 2, fps: 12, setup: () => layer.ready,
|
|
15
|
-
render(t) { cards.forEach((card, i) => { card.position.y = Math.sin(t + i) * 0.3; }); layer.render({ t, focusDistance: 10 - t }); }
|
|
16
|
-
});
|
|
17
|
-
</script></html>
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en"><meta charset="utf-8"><title>Cards</title>
|
|
3
|
+
<link rel="stylesheet" href="/multiplane/runtime/shot.css">
|
|
4
|
+
<style>#stage{width:640px;height:360px;background:#ddd}</style>
|
|
5
|
+
<script type="importmap">{"imports":{"three":"/multiplane/vendor/three/build/three.module.js","three/addons/":"/multiplane/vendor/three/examples/jsm/"}}</script>
|
|
6
|
+
<div id="stage"></div>
|
|
7
|
+
<script src="/multiplane/runtime/shot.js"></script>
|
|
8
|
+
<script type="module">
|
|
9
|
+
import { createThreeLayer } from '/multiplane/three.js';
|
|
10
|
+
const layer = createThreeLayer({ samples: 16, maxSamples: 64, aperture: 0.12, focusDistance: 10 });
|
|
11
|
+
const cards = [-2, 0, 2].map((z, i) => layer.card({ src: './assets/card.svg', width: 2.5, height: 2.5,
|
|
12
|
+
position: [(i - 1) * 2.3, 0, z], rotation: [0, (i - 1) * 0.2, 0] }));
|
|
13
|
+
window.EXAMPLE_LAYER = layer;
|
|
14
|
+
Shot.define({ duration: 2, fps: 12, setup: () => layer.ready,
|
|
15
|
+
render(t) { cards.forEach((card, i) => { card.position.y = Math.sin(t + i) * 0.3; }); layer.render({ t, focusDistance: 10 - t }); }
|
|
16
|
+
});
|
|
17
|
+
</script></html>
|
package/examples/typography.html
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en"><meta charset="utf-8"><title>Typography</title>
|
|
3
|
-
<link rel="stylesheet" href="/multiplane/runtime/shot.css">
|
|
4
|
-
<style>
|
|
5
|
-
@font-face{font-family:ExampleSans;src:url('./assets/Roboto-Variable.ttf') format('truetype');font-weight:100 900;font-display:swap}
|
|
6
|
-
#stage{width:640px;height:360px;background:#eee;color:#222;font-family:ExampleSans,sans-serif}
|
|
7
|
-
h1{position:absolute;left:48px;top:72px;font-size:48px;font-weight:400;margin:0}
|
|
8
|
-
p{position:absolute;left:48px;top:168px;font-size:24px;margin:0}
|
|
9
|
-
</style>
|
|
10
|
-
<div id="stage"><h1>Multiplane</h1><p>Frames in time</p></div>
|
|
11
|
-
<script src="/multiplane/runtime/shot.js"></script>
|
|
12
|
-
<script>
|
|
13
|
-
const heading = document.querySelector('h1'), line = document.querySelector('p');
|
|
14
|
-
Shot.define({ duration: 2, fps: 12, fonts: [['48px ExampleSans', 'MultiplaneFrames in time']],
|
|
15
|
-
render(t) { heading.style.transform = `translateX(${24 * t}px)`; line.style.opacity = String(Math.min(1, t * 2)); }
|
|
16
|
-
});
|
|
17
|
-
</script></html>
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en"><meta charset="utf-8"><title>Typography</title>
|
|
3
|
+
<link rel="stylesheet" href="/multiplane/runtime/shot.css">
|
|
4
|
+
<style>
|
|
5
|
+
@font-face{font-family:ExampleSans;src:url('./assets/Roboto-Variable.ttf') format('truetype');font-weight:100 900;font-display:swap}
|
|
6
|
+
#stage{width:640px;height:360px;background:#eee;color:#222;font-family:ExampleSans,sans-serif}
|
|
7
|
+
h1{position:absolute;left:48px;top:72px;font-size:48px;font-weight:400;margin:0}
|
|
8
|
+
p{position:absolute;left:48px;top:168px;font-size:24px;margin:0}
|
|
9
|
+
</style>
|
|
10
|
+
<div id="stage"><h1>Multiplane</h1><p>Frames in time</p></div>
|
|
11
|
+
<script src="/multiplane/runtime/shot.js"></script>
|
|
12
|
+
<script>
|
|
13
|
+
const heading = document.querySelector('h1'), line = document.querySelector('p');
|
|
14
|
+
Shot.define({ duration: 2, fps: 12, fonts: [['48px ExampleSans', 'MultiplaneFrames in time']],
|
|
15
|
+
render(t) { heading.style.transform = `translateX(${24 * t}px)`; line.style.opacity = String(Math.min(1, t * 2)); }
|
|
16
|
+
});
|
|
17
|
+
</script></html>
|