code formatter for angular vs code code example
Example 1: Parallax.js wrapper for react
import React, { Component } from 'react'
import Parallax from 'parallax-js'
class ParallaxComponent extends Component {
componentDidMount() {
this.parallax = new Parallax(this.scene)
}
componentWillUnmount() {
this.parallax.disable()
}
render() {
render (
<ul ref={el => this.scene = el}>
<li className="layer" dataDepth="0.00">
<img src="layer1.png"/>
</li>
<li className="layer" dataDepth="0.50">
<img src="layer2.png"/>
</li>
<li className="layer" dataDepth="1.00">
<img src="layer3.png"/>
</li>
</ul>
)
}
}
Example 2: flutter code for curvy hesding paint
path1.moveTo(size.width / 4, 0);
path1.quadraticBezierTo(size.width / 4 + size.width / 20, size.height / 100,
size.width / 4 + size.width / 20, size.height / 30);
path1.lineTo(
size.width / 4 + size.width / 20, size.height / 30 + size.height / 50);
path1.quadraticBezierTo(size.width / 4 + size.width / 20,
size.height / 11 + 5, size.width / 2, size.height / 10.5);
path1.quadraticBezierTo(
size.width - size.width / 4 - size.width / 20,
size.height / 11 + 5,
size.width - size.width / 4 - size.width / 20,
size.height / 30 + size.height / 50);
path1.lineTo(
size.width - size.width / 4 - size.width / 20, size.height / 30);
path1.quadraticBezierTo(
0.7 * size.width, size.height / 100, size.width * 3 / 4, 0);