Skip to content

Instantly share code, notes, and snippets.

View leochocolat's full-sized avatar
🎯
Focusing

Léo Mouraire leochocolat

🎯
Focusing
View GitHub Profile
const path = require('path');
const HandlebarsPlugin = require('handlebars-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const postcssPresetEnv = require('postcss-preset-env');
const ImageminPlugin = require('imagemin-webpack-plugin').default;
const cssnano = require('cssnano');
const { makeDataReplacements, registerHandlersHelpers } = require('./webpack.helpers.js');
import EventDispatcher from '../events/EventDispatcher';
import bindAll from '../utils/bindAll';
import DeviceUtils from '../utils/DeviceUtils';
import VirtualScroll from 'virtual-scroll';
class SnapScrollManager extends EventDispatcher {
constructor(options = {}) {
super(options);
import bindAll from '../utils/bindAll';
class TeamModal {
constructor(el) {
this.el = el;
this.modal = document.querySelector('.people-modal');
this.dom();
this.init();
}
//Code de base tu tuto:
void Update()
{
foreach (FlockAgent agent in agents)
{
List<Transform> context = GetNearbyObjects(agent);
//FOR DEMO ONLY
//agent.GetComponentInChildren<SpriteRenderer>().color = Color.Lerp(Color.white, Color.red, context.Count / 6f);
Flock agentFlock;
public Flock AgentFlock { get { return agentFlock; } }
//maybe dont use colliders for performances issues
//Collider agentCollider;
//public Collider AgentCollider { get { return agentCollider; } }
Vector3 agentPosition;
public Vector3 AgentPosition { get { return agentPosition; } }
_tick() {
this._updateDeltaTime();
this._cylinderMesh.rotation.z += 0.005;
this._cylinderMesh.rotation.x += 0.005;
// this._cylinderMesh.rotation.z += 0.03;
// this._cylinderMesh.rotation.x += 0.03;
this._uniforms.iChannel1.value = this._renderTarget.texture;
this._renderer.setRenderTarget(this._renderTarget);
this._renderer.render(this._scene, this._camera);
<template>
<canvas class="three-canvas"></canvas>
</template>
<script>
import ThreeCanvasComponent from '~/assets/javascript/components/ThreeCanvasComponent';
export default {
props: {
#define numTextures 7
#define THRESHOLD 0.2
uniform vec3 iResolution;
uniform float iTime;
uniform float iTimeDelta;
uniform float iFrame;
uniform sampler2D u_texture;
// uniform sampler2D u_textures;
setupScrollParagraph() {
let scrollParagraph = this.$el.querySelector('.js-scroll-paragraph');
let originalContent = scrollParagraph.innerHTML;
let splits = new SplitText(scrollParagraph, {
type: 'lines',
linesClass: 'line-container line-container--++',
});
let lines = [];
import Flickity from 'flickity'
import { TweenLite, Power4, TimelineLite } from 'gsap';
import mod from '../utils/mod';
class MissionsSlider {
constructor(el) {
this.el = el
this.dom()
}