For the sole purpose to use SASS, you need to install Ruby the right way. That is with either RBENV or RVM. If you are not going to do the Ruby on Rails training, I highly encorage you to do it with RVM.
Run the following commands in your terminal:
function* generateNewParticles() { | |
let randoms = [], | |
particles = [] | |
while (true) { | |
randoms = [random(), random(), random()] | |
particles = [0, 0, getRandomFloat(-500, -200)] | |
yield { randoms, particles } | |
} | |
} |
const particlesGeometry = new THREE.BufferGeometry() | |
const particlesVertices = [] | |
const particlesRandoms = [] | |
const flyingParticles = 150 | |
let isPlaying = false | |
let animFrame = null | |
const offscreenLimit = 100 | |
const particleAcceleration = 0.002 |
export function createPointMaterial(size, opacity = 1) { | |
const matCanvas = document.createElement('canvas') | |
matCanvas.width = size | |
matCanvas.height = size | |
const matContext = matCanvas.getContext('2d') | |
const texture = new CanvasTexture(matCanvas) | |
const center = size / 2 | |
matContext.beginPath() | |
matContext.arc(center, center, size / 2, 0, 2 * Math.PI, false) | |
matContext.closePath() |
cons AsyncRoute = () => import('./screens/AsyncRoute.vue') | |
const router = new VueRouter({ | |
routes: [ | |
{ path: '/async', component: AsyncRoute } | |
] | |
}) |
import Vue from 'vue' | |
import Navbar from '../../components/Navbar' | |
const AsyncComponent = () => import('../../components/AsyncComponent') | |
const vm = new Vue({ | |
el: '#app', | |
// ... all attributes necessary for your instance | |
components: { Navbar, AsyncComponent } |
import { RouterModule, Routes, PreloadAllModules } from @angular/router; | |
// You can say to Angular the route is async with the hash at the end of the import | |
export const ROUTES: Routes = [ | |
{ path: '', pathMatch: 'full', redirectTo: 'dashboard' }, | |
{ path: 'dashboard', loadChildren: '../dashboard/dashboard.module#DashboardModule' }, | |
{ path: 'settings', loadChildren: '../settings/settings.module#SettingsModule' }, | |
{ path: 'reports', loadChildren: '../reports/reports.module#ReportsModule' } | |
]; |
import React from 'react'; | |
// We can use react-loadable to cover the most possibles outcomes of the code splitting | |
import Loadable from 'react-loadable'; | |
// My Loader component | |
import Loader from '@components/Loader'; | |
// Create the async route | |
const AsyncRoute = Loadable({ | |
loader: () => import('./index'), |
.conversation-container > .header { | |
background-color: red; | |
} | |
.message > .response { | |
background-color: black; | |
color: white; | |
} |
import React, { Component } from 'react'; | |
import { Widget, addResponseMessage } from 'react-chat-widget'; | |
class App extends Component { | |
componentDidMount() { | |
addResponseMessage("Welcome to this awesome chat!"); | |
} | |
handleNewUserMessage = (newMessage) => { | |
console.log(`New message incomig! ${newMessage}`); |