@apatheticwes/scrollify
Advanced tools
Comparing version 0.4.1 to 0.4.2
@@ -393,2 +393,6 @@ 'use strict'; | ||
if (opts.debug) { | ||
console.log('Scrollify scene: ', scene); | ||
} | ||
return this; | ||
@@ -472,2 +476,8 @@ }; | ||
/** | ||
* [mapTo description] | ||
* @param{[type]} input [description] | ||
* @param{[type]} scale [description] | ||
* @return {[type]} [description] | ||
*/ | ||
Scrollify$1.prototype.mapTo = function mapTo (input, scale) { | ||
@@ -664,4 +674,4 @@ var parsed = parseFloat(input); | ||
function translateX(progress) { | ||
var to = this.options.to || 0; | ||
var from = this.options.from || 0; | ||
var to = parseFloat(this.options.to) || 0; | ||
var from = parseFloat(this.options.from) || 0; | ||
var offset = (to - from) * progress + from; | ||
@@ -679,4 +689,4 @@ | ||
function translateY(progress) { | ||
var to = this.options.to || 0; | ||
var from = this.options.from || 0; // this.transforms.position[1]; | ||
var to = parseFloat(this.options.to) || 0; | ||
var from = parseFloat(this.options.from) || 0; // this.transforms.position[1]; | ||
var offset = (to - from) * progress + from; | ||
@@ -706,4 +716,4 @@ | ||
function scale(progress) { | ||
var to = this.options.to || 1; | ||
var from = this.options.from || this.transforms.scale[0]; | ||
var to = parseFloat(this.options.to) || 1; | ||
var from = parseFloat(this.options.from) || this.transforms.scale[0]; | ||
var scale = (to - from) * progress + from; | ||
@@ -722,4 +732,4 @@ | ||
function fade(progress) { | ||
var to = this.options.to || 0; | ||
var from = this.options.from || 1; | ||
var to = parseFloat(this.options.to) || 0; | ||
var from = parseFloat(this.options.from) || 1; | ||
var opacity = (to - from) * progress + from; | ||
@@ -726,0 +736,0 @@ |
@@ -389,2 +389,6 @@ /** | ||
if (opts.debug) { | ||
console.log('Scrollify scene: ', scene); | ||
} | ||
return this; | ||
@@ -468,2 +472,8 @@ }; | ||
/** | ||
* [mapTo description] | ||
* @param{[type]} input [description] | ||
* @param{[type]} scale [description] | ||
* @return {[type]} [description] | ||
*/ | ||
Scrollify$1.prototype.mapTo = function mapTo (input, scale) { | ||
@@ -660,4 +670,4 @@ var parsed = parseFloat(input); | ||
function translateX(progress) { | ||
var to = this.options.to || 0; | ||
var from = this.options.from || 0; | ||
var to = parseFloat(this.options.to) || 0; | ||
var from = parseFloat(this.options.from) || 0; | ||
var offset = (to - from) * progress + from; | ||
@@ -675,4 +685,4 @@ | ||
function translateY(progress) { | ||
var to = this.options.to || 0; | ||
var from = this.options.from || 0; // this.transforms.position[1]; | ||
var to = parseFloat(this.options.to) || 0; | ||
var from = parseFloat(this.options.from) || 0; // this.transforms.position[1]; | ||
var offset = (to - from) * progress + from; | ||
@@ -702,4 +712,4 @@ | ||
function scale(progress) { | ||
var to = this.options.to || 1; | ||
var from = this.options.from || this.transforms.scale[0]; | ||
var to = parseFloat(this.options.to) || 1; | ||
var from = parseFloat(this.options.from) || this.transforms.scale[0]; | ||
var scale = (to - from) * progress + from; | ||
@@ -718,4 +728,4 @@ | ||
function fade(progress) { | ||
var to = this.options.to || 0; | ||
var from = this.options.from || 1; | ||
var to = parseFloat(this.options.to) || 0; | ||
var from = parseFloat(this.options.from) || 1; | ||
var opacity = (to - from) * progress + from; | ||
@@ -722,0 +732,0 @@ |
@@ -392,2 +392,6 @@ (function () { | ||
if (opts.debug) { | ||
console.log('Scrollify scene: ', scene); | ||
} | ||
return this; | ||
@@ -471,2 +475,8 @@ }; | ||
/** | ||
* [mapTo description] | ||
* @param{[type]} input [description] | ||
* @param{[type]} scale [description] | ||
* @return {[type]} [description] | ||
*/ | ||
Scrollify.prototype.mapTo = function mapTo (input, scale) { | ||
@@ -663,4 +673,4 @@ var parsed = parseFloat(input); | ||
function translateX(progress) { | ||
var to = this.options.to || 0; | ||
var from = this.options.from || 0; | ||
var to = parseFloat(this.options.to) || 0; | ||
var from = parseFloat(this.options.from) || 0; | ||
var offset = (to - from) * progress + from; | ||
@@ -678,4 +688,4 @@ | ||
function translateY(progress) { | ||
var to = this.options.to || 0; | ||
var from = this.options.from || 0; // this.transforms.position[1]; | ||
var to = parseFloat(this.options.to) || 0; | ||
var from = parseFloat(this.options.from) || 0; // this.transforms.position[1]; | ||
var offset = (to - from) * progress + from; | ||
@@ -705,4 +715,4 @@ | ||
function scale(progress) { | ||
var to = this.options.to || 1; | ||
var from = this.options.from || this.transforms.scale[0]; | ||
var to = parseFloat(this.options.to) || 1; | ||
var from = parseFloat(this.options.from) || this.transforms.scale[0]; | ||
var scale = (to - from) * progress + from; | ||
@@ -721,4 +731,4 @@ | ||
function fade(progress) { | ||
var to = this.options.to || 0; | ||
var from = this.options.from || 1; | ||
var to = parseFloat(this.options.to) || 0; | ||
var from = parseFloat(this.options.from) || 1; | ||
var opacity = (to - from) * progress + from; | ||
@@ -725,0 +735,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"license": "MIT", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"description": "A simple thing for triggering 'them scroll effects that everybody loves", | ||
@@ -8,0 +8,0 @@ "main": "./dist/scrollify.cjs.js", |
@@ -22,4 +22,4 @@ /** | ||
export function translateX(progress) { | ||
let to = this.options.to || 0; | ||
let from = this.options.from || 0; | ||
let to = parseFloat(this.options.to) || 0; | ||
let from = parseFloat(this.options.from) || 0; | ||
let offset = (to - from) * progress + from; | ||
@@ -37,4 +37,4 @@ | ||
export function translateY(progress) { | ||
let to = this.options.to || 0; | ||
let from = this.options.from || 0; // this.transforms.position[1]; | ||
let to = parseFloat(this.options.to) || 0; | ||
let from = parseFloat(this.options.from) || 0; // this.transforms.position[1]; | ||
let offset = (to - from) * progress + from; | ||
@@ -64,4 +64,4 @@ | ||
export function scale(progress) { | ||
const to = this.options.to || 1; | ||
const from = this.options.from || this.transforms.scale[0]; | ||
const to = parseFloat(this.options.to) || 1; | ||
const from = parseFloat(this.options.from) || this.transforms.scale[0]; | ||
const scale = (to - from) * progress + from; | ||
@@ -80,4 +80,4 @@ | ||
export function fade(progress) { | ||
const to = this.options.to || 0; | ||
const from = this.options.from || 1; | ||
const to = parseFloat(this.options.to) || 0; | ||
const from = parseFloat(this.options.from) || 1; | ||
const opacity = (to - from) * progress + from; | ||
@@ -84,0 +84,0 @@ |
@@ -103,2 +103,6 @@ /* | ||
if (opts.debug) { | ||
console.log('Scrollify scene: ', scene); | ||
} | ||
return this; | ||
@@ -180,2 +184,8 @@ } | ||
/** | ||
* [mapTo description] | ||
* @param {[type]} input [description] | ||
* @param {[type]} scale [description] | ||
* @return {[type]} [description] | ||
*/ | ||
mapTo(input, scale) { | ||
@@ -182,0 +192,0 @@ const parsed = parseFloat(input); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
770100
3865