SiriwaveJS porting for Titanium as Alloy widget.
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
assets
controllers
styles
views
LICENSE
README.md
widget.json

README.md

Ti.SiriWave

Gitter

com.caffeinalab.titanium.siriwave

####Watch the original script in JS

image

Installation

Via Gittio

gittio install com.caffeinalab.titanium.siriwave

Via Github

Download the latest release, unzip in app/widgets, and in your config.json, under dependencies add:

"dependencies": {
    "com.caffeinalab.titanium.siriwave": "*"
}

Usage

Require in the View

<Widget src="com.caffeinalab.titanium.siriwave" id="siri" autostart="true" noise="1" color="#fff" [options] />

And stylize globally via app.tss:

"#caffeinaSiriWave" : {
	width: 320,
	height: 150,
	backgroundColor: 'black',
	noise: 0.5
}

Properties

[speed] (Number, from 0 to 1, default: 0.1)

The speed of the wave.

[amplitude] (Number, from 0 to 1, default: 1)

The noise (amplitude) of the wave.

[frequency] (Number, from 0 to N, default: 1)

The noise (amplitude) of the wave.

[color] (String, Color, default: `#fff')

The color of the wave, in hexadecimal form (#336699, #FF0)

API

set(property, value)

Set the property at runtime

start()

Start the wave

stop()

Stop the wave