Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
JrMasterModelBuilder committed Oct 16, 2023
1 parent f66d308 commit df95406
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,52 @@ projector.nestXtrasContents = true;
await projector.write();
```

### HTML

```js
import {ProjectorHtml} from '@shockpkg/dir-projector';

const projector = new ProjectorHtml('projector-html/application.html');

// Required properties.
projector.src = 'movie.dir';
projector.width = 640;
projector.height = 480;

// Optionally configure HTML document.
p.lang = 'en-US';
p.title = 'A "special" title with <html> characters';
p.background = '#000000';
p.color = '#999999';

// Optionally configure object/param/embed elements.
p.bgcolor = '#000000';
p.id = 'element-id';
p.name = 'element-name';
p.codebase =
'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=12,0,0,112';
p.pluginspage = 'http://www.macromedia.com/shockwave/download/';
p.swStretchStyle = 'none';
p.swStretchHAlign = 'center';
p.swStretchVAlign = 'center';
p.swRemote =
"swSaveEnabled='false' swVolume='false' swRestart='false' swPausePlay='false' swFastForward='false' swContextMenu='true'";
p.sw1 = 'one';
p.sw2 = 'two';
p.sw3 = 'three';
p.sw4 = 'four';
p.sw5 = 'five';
p.sw6 = 'six';
p.sw7 = 'seven';
p.sw8 = 'eight';
p.sw9 = 'nine';
p.progress = false;
p.logo = false;
p.playerVersion = 12;

await projector.write();
```

## Bundle

### Otto
Expand Down Expand Up @@ -177,6 +223,26 @@ await bundle.write(async b => {
});
```

### HTML

```js
import {BundleHtml} from '@shockpkg/dir-projector';

const bundle = new BundleHtml('bundle-html/application.html');

// Use projector property to set options.
bundle.projector.src = 'movie.dir';
bundle.projector.width = 640;
bundle.projector.height = 480;

await bundle.write(async b => {
// Add resources in callback.
await b.copyResource('movie.dir', 'movie.dir');
});
```

A bundle can also be made "flat" into an empty directory with nesting the resources or adding a launcher stub by passing true as the second argument to the constructor.

# Bugs

If you find a bug or have compatibility issues, please open a ticket under issues section for this repository.
Expand Down

0 comments on commit df95406

Please sign in to comment.