Skip to content

Instantly share code, notes, and snippets.

updateMatrixWorld(force) {
if (this.matrixWorldNeedsUpdate || force) {
if (this.visible) {
const cameraObject = camera.activeCamera.instance
this.quaternion.copy(this.parent.quaternion)
this.quaternion.conjugate()
this.quaternion.multiply(cameraObject.quaternion)
_modelViewMatrix.multiplyMatrices(cameraObject.matrixWorldInverse, this.matrixWorld)
_mvPosition.setFromMatrixPosition(_modelViewMatrix)
function _onTouchMove(e) {
_mousePosition
//マウススクリーン位置
.set(
(e.clientX / window.innerWidth) * 2 - 1,
-(e.clientY / window.innerHeight) * 2 + 1,
0
)
.unproject(camera)
.sub(camera.position)
@112KA
112KA / gist:6067b34b3fcd50379e333039587c2026
Created May 27, 2021 02:57
特定のディレクトリをBASIC認証から除外する.htaccess
Satisfy Any
Order allow,deny
Allow from all
Deny from none

削除

filter-branch

Troubles

Can't squash-merge: 'foo' was never added.

最初のgit subtree addがうまくいってなかった。
存在するディレクトリを指定するのはだめ。

@112KA
112KA / distanceFrom.js
Created April 10, 2019 23:16
指定した日時からの差を時間で返す
{
distanceFrom(utcDateString) {
const date = new Date(utcDateString),
current = new Date(),
seconds = (current.getTime() - date.getTime()) / 1000
// 59分以内だったら、minで返す
if(seconds < 60 * 59) {
return Math.ceil(seconds/60) + '分前'
}
@112KA
112KA / sample.htaccess
Created January 22, 2019 04:36
.htaccess note
# mod_rewrite有効化
# httpd.confにて既に有効化済
#LoadModule rewrite_module modules/mod_rewrite.so
# Basic Authorization
AuthType Basic
AuthUserFile "/var/www/.htpasswd"
AuthGroupFile /dev/null
AuthName "Basic Auth. Enter ID and password."
Require valid-user
@112KA
112KA / setting.ahk
Last active September 4, 2018 02:11
for AutoHotkey
;G5ボタン&マウスホイールでWindow切り替え
sc07B & WheelDown::ShiftAltTab
sc07B & WheelUp::AltTab
;G5ボタン&右クリックで選択したテキストをgoogle検索
sc07B & RButton::
clipboard =
Send, ^c
Sleep 100
Run, http://www.google.com/search?q=%clipboard%
@112KA
112KA / console_log.sublime-macro
Last active May 19, 2018 00:10
output console.log() shortcut in Sublime Text
[
{ "args": {"to": "word"}, "command": "expand_selection" },
{ "args": null, "command": "copy" },
{ "args": { "to": "eol" }, "command": "move_to" },
{ "args": { "characters": "\n" }, "command": "insert" },
{ "args": { "characters": "console.log('" }, "command": "insert" },
{ "args": null, "command": "paste" },
{ "args": { "characters": ": ', " }, "command": "insert" },
{ "args": null, "command": "paste" },
{ "args": { "characters": ");" }, "command": "insert" }