What do you want to save?
Add Code snippet
New code examples
-
Other 2021-09-15 23:01:02
unity dash script
public vector3 moveDirection; public float maxDashTime = 1.0f; public float dashSpeed = 1.0f; public float dashStoppingSpeed = 0.1f; private float currentDashTime; void Start() { currentDashTime = MaxDashTime; } void Update() { if (input.getBu... Add solution -
Javascript 2021-09-15 00:57:04
javascript get main color from image
const canvas = document.getElementById("canvas"), preview = document.getElementById("preview"), ctx = canvas.getContext("2d"); canvas.width = 1; canvas.height = 1; preview.width = 400; preview.height = 400; function ge... Add solution -
C# 2021-09-14 12:21:01
unity check when clicked on object
void Update() { // Check for mouse input if (Input.GetMouseButton(0)) { Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); RaycastHit hit; // Casts the ray and get the first game object hit Physics.Raycast(ray, out hit); ... Add solution -
Javascript 2021-09-14 09:56:02
how to validate express js form
// Validation rules.var loginValidate = [ check('username', 'Username Must Be an Email Address').isEmail(), check('password').isLength({ min: 8 }) .withMessage('Password Must Be at Least 8 Characters') .matches('[0-9]').withMessage('Password Must Cont... Add solution -