Socket
Socket
Sign inDemoInstall

html-hyperdrive

Package Overview
Dependencies
1
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    html-hyperdrive

CSS3D renderer for a dynamic, interactive flying space environment.


Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Install size
9.15 MB
Created
Weekly downloads
 

Readme

Source


: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

FAQs

Last updated on 24 Nov 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc