garris / TremulaJS

TremulaJS: Picture Streams + Momentum Engine + Bézier Paths + Multi-Device
GNU General Public License v3.0
1.31k stars 82 forks source link

Adding customized HTML to a TremulaJS layout. #31

Open garris opened 9 years ago

garris commented 9 years ago

This is another common question I've gotten on twitter. Here is a quick response...

Look in the gh-pages-demo directory and look at tremulaAdapters.js file.   On line 15, see the template property … that’s the guy you want.  You can add any html there and you can add your own method to that file to process your own data stream with your own properties.  You can arbitrarily add dynamic data by directly injecting (or find and replacing) DOM in your template.   You can see a complex example of this by looking at /src/DataAdatpers.js   see the block starting at line 79 this.template = …

Please post here with specific questions.

GS