0.0.15 • Published 7 years ago

html-hyperdrive v0.0.15

Weekly downloads
1
License
WTFPL
Repository
-
Last release
7 years ago

:zap: HTML Hyperdrive :zap:

Work In Progress

A utility library for creating spatial, interactive CSS3D experiences.

Usage

See the example/index.js file for reference.

HTML Hyperdrive renders HML (Hyperdrive Markup Language), which is just HTML as a string with some configuration...

eg:

var HTMLHyperDrive = require('html-hyperdrive');
var htmlElms = [
  {
    style: {
      height: '400px',
      width: '300px',
    },
    html: '<h1>Title</h1>'
  },
  {
    style: {
      height: '400px',
      width: '300px',
      boxSizing: 'border-box',
    },
    html: '<h2>Sub Title</h2>'
  },
  {
    style: {
      height: '600px',
      width: '800px',
    },
    html: '<p>Body <img src="lol.jpg" /></p>'
  }
];

var app = new HTMLHyperDrive(document.getElementById('container'), htmlElms);
app.startScene();

will render 3 stream elements with the provided styles (write in JS syntax), and markup.

Configuration

optionally, you can pass a config object as the 3rd parameter as so

var container = document.getElementById( ... );
var htmlElms = { ... };
var config = { ... };
var app = new HTMLHyperDrive(container, htmlElms, config);
KeyDescription
moveSpeedSpeed for "automove". Default is 3
xRangeThe range of possible x values (affects how close/far elements are from each other)
zDepthThe z depth of the total cluster of elements.
zoomInCbCallback fired when an element is clicked and "zoomed" into. Will callback with the obj as first parameter.
zoomOutCbCallback fired when body is clicked from "zoomed" state and return to all elements.
mountCbCallback fired when an element is initially rendered into DOM. Will callback with the obj as first parameter.

Controls:

  • s : start/stop auto drift
  • esc : zoom out of zoomed in view
0.0.15

7 years ago

0.0.14

8 years ago

0.0.13

8 years ago

0.0.12

8 years ago

0.0.11

8 years ago

0.0.10

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago