This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| body { | |
| margin: 0; | |
| } | |
| html { | |
| /* | |
| * Disable pinch-to-zoom, double-tap to zoom and panning the body (scrolling gestures). | |
| * To enable scrolling: `touch-action: pan-x pan-y`. | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| html, body { | |
| /* Disable double-tap to zoom to prevent click event delay | |
| See: https://webkit.org/blog/5610/more-responsive-tapping-on-ios/ */ | |
| touch-action: manipulation; | |
| /* Disable the highlight that appears when you tap on an element */ | |
| -webkit-tap-highlight-color: transparent; | |
| /* Disable automatic browser bold/italic font variant generation */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // LinearAnimation.ts | |
| // Created by Ben on 2/15/26. | |
| // | |
| export class LinearAnimation { | |
| fromRange: LinearAnimationRange; | |
| toRange: LinearAnimationRange; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// | |
| /// # EscapedContinuation | |
| /// | |
| /// ## Usage | |
| /// | |
| /// 1. Call: | |
| /// | |
| /// ```swift | |
| /// let continuation = await EscapedContinuation<ReturnsType>() | |
| /// ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let a, b; | |
| const obj = { a: 1, b: 2 }; | |
| ({ a, b } = obj); | |
| console.log(a, b); // 1 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| // without response: | |
| for await (async of promises) {} | |
| OR | |
| await Promise.all(promises); | |
| // with response: | |
| for await (const resp of promises) { | |
| console.log(resp); // same as: const resp = await promise; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function a(b, { c = 1 } = {}) { | |
| console.log(b, c); | |
| } | |
| // a(2) -> '2 1' | |
| // a(2, { c: 3 }) -> '2 3' | |
| // a(2, {}) -> '2 1' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // https://discourse.threejs.org/t/iphone-how-to-remove-text-selection-magnifier/47812/11 | |
| function createHandler(func, timeout) { | |
| let timer = null; | |
| let pressed = false; | |
| return function() { | |
| if (timer) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import bpy | |
| from mathutils import Vector | |
| # Edit these: | |
| offset = 1 # Offset is the interval between each brick appearance | |
| startFrame = 0 # Start Frame is the frame that the brick animation starts on | |
| # Variables | |
| frameNum = startFrame | |
| selectedBricks = bpy.context.selected_objects |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Array.prototype.equals=function(a){for(var b=0;b<this.length;b++)if(this[b]!=a[b])return!1;return!0}; | |
| [0,1].equals([0,1]) // true |
NewerOlder