$ rails g model User
belongs_to
has_one
Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative
float rand(float n){return fract(sin(n) * 43758.5453123);}
float noise(float p){
float fl = floor(p);
float fc = fract(p);
bool HelloWorld::init(){ | |
if(!Layer::init()){ return false; } | |
//ブラーの幅等を設定 | |
const int maxRadius = 64; | |
int step = 1, radius = 40; | |
int radiusWithStep = radius / step; | |
Vec2 *weights = new Vec2[maxRadius]; | |
calculateGaussianWeights(radiusWithStep, weights); |
package main | |
import ( | |
"bufio" | |
"io/ioutil" | |
"os/signal" | |
//"syscall" | |
"fmt" | |
"log" | |
"os" |
Picking the right architecture = Picking the right battles + Managing trade-offs
Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.
You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.
RN < 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache | |
RN >= 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache | |
RN >= 0.63 - watchman watch-del-all && rm -rf node_modules && npm install && rm -rf /tmp/metro-* && npm run start --reset-cache | |
npm >= 5 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache | |
Windows - del %appdata%\Temp\react-native-* & cd android & gradlew clean & cd .. & del node_modules/ & npm cache clean --force & npm install & npm start -- --reset-cache |
この文章は、日経BP社から出版されている「HTML5ゲーム開発の極意」の付録PDFを元に、参照しやすいようmarkdown形式に書き起こした、個人的メモです。
// SAT collision check and resolution | |
// Public domain | |
// Usage example: | |
// if (testCollision(obb1, obb2, mtv)) { // obb1, obb2 - sf::RectangleShape, mtv - sf::Vector2f | |
// obb1.move(mtv); | |
// } | |
static const float NORMAL_TOLERANCE = 0.0001f; | |
using RectVertexArray = std::array<sf::Vector2f, 4>; |