git @ Cat's Eye Technologies HTML5-Gewgaws / 90df3b5
Update README (common-yoob.js-0.x, Consistent Gewgaw Interface) Chris Pressey 10 years ago
1 changed file(s) with 31 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
1414 [the online Gallery at Cat's Eye Technologies](http://catseye.tc/node/Online_Installation).
1515
1616 Many of these gewgaws make use of the [yoob.js](http://catseye.tc/node/yoob.js)
17 library. In these cases, the gewgaw will have its own `yoob` subdirectory with
18 a snapshot of (the parts of) `yoob.js` that it uses, from the version of
19 `yoob.js` that was current when it was written. Consolidation of these into a
20 common `yoob-0.x` directory of some sort is a future possibility.
17 library. Generally, the gewgaw will use the yoob.js files from the
18 `common-yoob.js-0.x` directory in the root of this repo. If it needs a
19 different version of yoob.js for some reason, it may use a local `yoob`
20 subdirectory.
2121
2222 The contents of this repo are in the public domain; see the file `UNLICENSE`
2323 for more information. This includes any images found within, which I have
2424 either obtained from public domain sources, or hereby place into the public
2525 domain. This includes, too, the bits and pieces of `yoob.js`, which is
2626 itself in the public domain.
27
28 ### Consistent Gewgaw Interface ###
29
30 This is really just a set of notes for establishing a consistent interface
31 for starting these gewgaws.
32
33 You can't currently, but you ought to be able to say something like this to
34 start any of these gewgaws:
35
36 <script src="yoob/whatevs.js"></script>
37 <script src="any-gewgaw.js"></script>
38 <script>
39 yoob.gewgaws["any-gewgaw.js"].launch({container: 'foo'});
40 </script>
41
42 ...where `foo` is the id of a `div` (probably) element somewhere in the
43 page. The `launch` method should create the elements needed for the
44 gewgaw (often a canvas and a control panel div) inside the container.
45
46 There should maybe be some kind of "full window"/"fullscreen" flags in
47 there too — "full window" would expand the container to fill the
48 browser window, and "full screen" would probably add a full-screen-ifying
49 button.
50
51 And yoob.js requirements...? Oh gosh, there are fancy Javascript ways for
52 specifying those sort of things nowadays, aren't there. Oh, but they're all
53 so heavyweight. Bah.