prismdeckjs 0.1.0
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 +21 -0
- package/README.md +45 -0
- package/dist/chunks/rapier-D1P_-6v-.js +5727 -0
- package/dist/document/archive.d.ts +17 -0
- package/dist/document/archive.d.ts.map +1 -0
- package/dist/document/archive.js +105 -0
- package/dist/document/archive.js.map +1 -0
- package/dist/document/html.d.ts +10 -0
- package/dist/document/html.d.ts.map +1 -0
- package/dist/document/html.js +149 -0
- package/dist/document/html.js.map +1 -0
- package/dist/document/types.d.ts +188 -0
- package/dist/document/types.d.ts.map +1 -0
- package/dist/document/types.js +21 -0
- package/dist/document/types.js.map +1 -0
- package/dist/document/validate.d.ts +9 -0
- package/dist/document/validate.d.ts.map +1 -0
- package/dist/document/validate.js +77 -0
- package/dist/document/validate.js.map +1 -0
- package/dist/import/index.d.ts +9 -0
- package/dist/import/index.d.ts.map +1 -0
- package/dist/import/index.js +41 -0
- package/dist/import/index.js.map +1 -0
- package/dist/import/odp.d.ts +3 -0
- package/dist/import/odp.d.ts.map +1 -0
- package/dist/import/odp.js +529 -0
- package/dist/import/odp.js.map +1 -0
- package/dist/import/pptx.d.ts +3 -0
- package/dist/import/pptx.d.ts.map +1 -0
- package/dist/import/pptx.js +634 -0
- package/dist/import/pptx.js.map +1 -0
- package/dist/import/xml.d.ts +19 -0
- package/dist/import/xml.d.ts.map +1 -0
- package/dist/import/xml.js +100 -0
- package/dist/import/xml.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/physics/rapier.d.ts +36 -0
- package/dist/physics/rapier.d.ts.map +1 -0
- package/dist/physics/rapier.js +137 -0
- package/dist/physics/rapier.js.map +1 -0
- package/dist/prism-deck.min.js +61229 -0
- package/dist/render/renderer.d.ts +78 -0
- package/dist/render/renderer.d.ts.map +1 -0
- package/dist/render/renderer.js +512 -0
- package/dist/render/renderer.js.map +1 -0
- package/dist/render/stereo.d.ts +20 -0
- package/dist/render/stereo.d.ts.map +1 -0
- package/dist/render/stereo.js +26 -0
- package/dist/render/stereo.js.map +1 -0
- package/dist/runtime/player.d.ts +30 -0
- package/dist/runtime/player.d.ts.map +1 -0
- package/dist/runtime/player.js +91 -0
- package/dist/runtime/player.js.map +1 -0
- package/dist/runtime/session.d.ts +50 -0
- package/dist/runtime/session.d.ts.map +1 -0
- package/dist/runtime/session.js +212 -0
- package/dist/runtime/session.js.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +3 -0
- package/dist/version.js.map +1 -0
- package/package.json +61 -0
- package/schema/prismdeck.schema.json +124 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Haochuan Zhang
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# prismdeckjs
|
|
2
|
+
|
|
3
|
+
Browser-native spatial presentation SDK used by
|
|
4
|
+
[PrismDeck Studio](https://lunarmoon26.github.io/PrismDeckJS/).
|
|
5
|
+
|
|
6
|
+
## Capabilities
|
|
7
|
+
|
|
8
|
+
- Local `.pptx`, `.odp`, `.prismdeck`, and PrismDeck HTML import.
|
|
9
|
+
- Versioned normalized document and asset bundle.
|
|
10
|
+
- Three.js mono, full-SBS, and half-SBS rendering from one scene.
|
|
11
|
+
- Editable depth, rotation, thickness, text, and optional Rapier physics.
|
|
12
|
+
- PowerPoint and ODP template layouts that can instantiate slides.
|
|
13
|
+
- Single-file editable HTML export with CDN-hosted Three.js playback.
|
|
14
|
+
|
|
15
|
+
## Basic use
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { DeckPlayer, importPresentation } from 'prismdeckjs';
|
|
19
|
+
|
|
20
|
+
const input = await file.arrayBuffer();
|
|
21
|
+
const deck = await importPresentation(input, { sourceName: file.name });
|
|
22
|
+
const player = await DeckPlayer.create(canvas, deck, {
|
|
23
|
+
physics: true,
|
|
24
|
+
autoStart: true,
|
|
25
|
+
});
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Call `player.dispose()` when the canvas is no longer used. Imported files are
|
|
29
|
+
parsed locally; the SDK does not upload source bytes or execute macros, scripts,
|
|
30
|
+
or OLE objects.
|
|
31
|
+
|
|
32
|
+
## Browser module and HTML export
|
|
33
|
+
|
|
34
|
+
```js
|
|
35
|
+
import * as PrismDeck from 'https://cdn.jsdelivr.net/npm/prismdeckjs@latest/dist/prism-deck.min.js';
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
`savePrismDeckHtml(deck)` embeds the full document archive and assets into one
|
|
39
|
+
HTML file. `loadPrismDeckHtml(bytes)` recovers the same editable `LoadedDeck`
|
|
40
|
+
without executing HTML-authored scripts. The default runtime URL is pinned to the
|
|
41
|
+
installed `prismdeckjs` package version and can be overridden with an absolute
|
|
42
|
+
HTTPS URL.
|
|
43
|
+
|
|
44
|
+
See the [repository](https://github.com/lunarmoon26/PrismDeckJS) for the schema,
|
|
45
|
+
compatibility policy, Studio, and development instructions.
|