JavaScript
www.npmjs.comZIG SIMããéããã¦ããå¤ã¯ãZIG indicatorã§ç¢ºèªãããã¨ããã§ãããæ®å¿µãªããOSCãåãåããã¨ã¯ã§ããªãã®ã§ãNode.jsãæ¸ãã¦ããããã£ã¨ã¿ã¼ããã«ä¸ã§ç¢ºèªãã¾ããzig-project.com ã½ã¼ã¹ã³ã¼ã package.json { "name": "osc-develâ¦
serialport.ioArduinoã®Serial Monitorã使ã£ã¦ãè¯ãã®ã§ãããå人çã«ã¯ãããã£ã¨Node.jsãæ¸ãã¦ãã¿ã¼ããã«ä¸ã§ç¢ºèªãããã¨ãå¤ãã§ããwww.arduino.cc åä¿¡ ã½ã¼ã¹ã³ã¼ã package.json { "name": "serial-develop", "version": "1.0.0", "main": "iâ¦
ãã¾ã¾ã§ãMediaDevices.getUserMediaã§åå¾ã§ããã¹ããªã¼ã ã¯ã²ã¨ã¤ã ããã¨æãè¾¼ãã§ãã¾ããããã²ãããªãã¨ããè¤æ°åå¾ã§ãããã¨ãç¥ãã¾ããã ãªã®ã§ããã£ãããMediaDevices.getUserMediaã使ã£ã¦ãPCã«æ¥ç¶ãã¦ããã«ã¡ã©ã®æ åãè¤æ°åæã«è¡¨â¦
developer.mozilla.orgPicture-in-Picture APIã使ã£ã¦ãVideoè¦ç´ ããã¯ãã£ã¼ã¤ã³ãã¯ãã£ã§åçãã¦ã¿ã¾ããã iOS Safariï¼18.2ï¼ãAndroid Chromeï¼131.0.6778.135ï¼ã§ãåä½ã確èªæ¸ã¿ã§ãã ã½ã¼ã¹ã³ã¼ã <html> <head> <style> video { display: block; width: 640px; }</style></head></html>â¦
SpeechSynthesisUtteranceã使ç¨ãã let number = 0; setInterval(() => { const utterThis = new SpeechSynthesisUtterance(); utterThis.text = String(++number); speechSynthesis.speak(utterThis); }, 1000); ãããªæãã§ãæ°åãèªã¿ä¸ããWebãµã¤ãâ¦
æè¿ã¯ããã£ã±ãNext.jsã使ã£ã¦Webãµã¤ããå¶ä½ããããElectronã¨çµã¿åããã¦Macã¢ããªãå¶ä½ããããã¦ãã¾ãã ãã©ã¤ãã®Webãµã¤ãã§ãããNext.jsãéçãµã¤ãã¸ã§ãã¬ã¼ã¿ã¨ãã¦ä½¿ã£ã¦ããã®ã§ããããã©ã¤ãã®ãµã¤ãã§ããã°ãNext.jsãReactãä¸â¦
é常Macã«ã¤ã¤ãã³ãç¹ãã å ´åãé³æºã¯ã¤ã¤ãã³ããåçããã¾ãã ããããMacã«ã¯ããã©ã«ãã¢ããªã¨ãã¦ãAudio MIDI è¨å®ããå ¥ã£ã¦ããããªã¼ãã£ãªã®ã¤ã³ã¢ã¦ãã好ããªããã«ã«ã¹ã¿ãã¤ãºã§ãã¾ããsupport.apple.comããã¦ãAudio MIDI è¨å®ã¨WebAuâ¦
çµè« å¤ãã®å ´åãrequestAnimationFrameã®FPSã¯ãã£ã¹ãã¬ã¤ã®ãªãã¬ãã·ã¥ã¬ã¼ãã«ä¾åãã¾ããdeveloper.mozilla.orgãããããã£ã¹ãã¬ã¤ã«ä¾åããã«FPSã®æ大å¤ãè¨å®ãããå ´åã const fps = 60; let lastRenderTime = 0; function render(now) { coâ¦
ããã¾ã§ãsuperã®ä½¿ãéã¯ã class Child extends Parent { constructor(params) { super(params); } } ã¨ããæãã§ãconstructorå ã§å®è¡ãããã¨ã ãã ã¨æã£ã¦ããã®ã§ããã ãã¾ãããªãããsuper.prop ããã³ super[expr] å¼ã«ã¦ã親ã®ã¡ã½ãããå¼â¦
ãã¾ã¾ã§ããµã¼ãã³ã³ã½ã¼ã«ã§è¨æ¸¬ãã¦ããã®ã§ãéçºä¸ã¯ã©ããã£ã¦è¨æ¸¬ããããæ©ãã§ããã®ã§ãããJavaScriptã§è¨æ¸¬ã§ãããã¨ãç¥ãã¾ãããsearch.google.com new PerformanceObserver((entryList) => { for (const entry of entryList.getEntries()) â¦
çµè« URLã¨ã³ã³ã¼ããæãã¾ãããã ãã¨ã®çºç«¯ ãã£ãããããªæãã®ã³ã¼ããæ¸ãã¦ã¾ãã¦ãvalueã«æ¸¡ãããæååã表示ãããã¨ãã¦ããã¨ãã®ãã¨ã§ãã page.tsx 'use client'; import { useRouter, useSearchParams } from 'next/navigation'; importâ¦
Three.jsãPIXI.jsçµç±ã§ãéæ¥çã«WebGLã使ã£ããã¨ã¯ãããã®ã®ãç´æ¥æä½ããããã¨ããªãã£ãã®ã§ããã¡ããã¡ãåºæ¬çãªã¨ãããã触ã£ã¦ã¿ã¾ããã é åºã¨ãã¦ã¯ã 試ãã«ä¸è§å½¢ãæã 試ãã«åè§å½¢ãæã åè§å½¢ã«ãã¯ã¹ãã£ãè²¼ã ã¨ããé åºã§é²ãâ¦
æã¯ãã¯ãªãããã¼ãã«ããã¹ããã³ãã¼ããã ãã®ããã«Flashã使ã£ãããã¦ãã¾ããããç¾å¨ã¯JavaScriptã®navigator.clipboardã ãã§å®ç¾ã§ãã¾ããdeveloper.mozilla.org DEMO ãã©ã¼ãã®åºå ´ãã¿ã³ãæ¼ãã¨ãããã®ã¤ã¼ããã¼ã´ã©ã®ããã¨ãã£ã風ãå¤â¦
DEMO iza-kamakura.kimizuka.fm ãªãã¸ã㪠github.com å¶ä½çµç·¯ navigator.geolocation.watchPositionã®æ¤è¨¼ã®ããã«ãç¾å¨å°ããéåé§ ã¾ã§ã®ç´ç·è·é¢ã表示ããã ãã®ã¦ã§ããµã¤ããã¤ããã¾ãããdeveloper.mozilla.orgnavigator.geolocation.watchPositâ¦
ãã¡ãã®è¨äºã®ES Modulesãã¼ã¸ã§ã³ã§ãã â» Node.js v20.10.0ãyarn 1.22.22 ã§ä½æblog.kimizuka.org å¿ è¦ãªããã±ã¼ã¸ãã¤ã³ã¹ãã¼ã« yarn add express socket.io app.mjsãä½æ import { createServer } from 'node:http'; import path from 'node:pathâ¦
ã¿ã¤ãã«ã®éãã§ãããES Moduleã§__diranameã使ãæ¹æ³ã§ããä¾ãã°ãindex.jsããindex.cjsã«ã console.log(__dirname); ã¨è¨è¿°ãã node index.jsnode index.cjsãå®è¡ããã¨ããã£ã¬ã¯ããªã¾ã§ã®ãã¹ã表示ããã¾ãããindex.mjsã«ã console.log(__diâ¦
Cubeãã¯ãªãã¯ããããã¨ãæ¤ç¥ HTTPãªã¯ã¨ã¹ãï¼GETï¼ã§JSONã®åå¾ HTTPãªã¯ã¨ã¹ãï¼POSTï¼ã§JSONã®éä¿¡ WebSocketã«ããéä¿¡ ä»åã¯ãã blog.kimizuka.orgblog.kimizuka.orgblog.kimizuka.orgä»åã®ã¢ãã¯ãä½ãããã¦è²ã ã¨è¨äºãæ¸ãã¦ãã¾ããããç´â¦
Cubeãã¯ãªãã¯ããããã¨ãæ¤ç¥ HTTPãªã¯ã¨ã¹ãï¼GETï¼ã§JSONã®åå¾ HTTPãªã¯ã¨ã¹ãï¼POSTï¼ã§JSONã®éä¿¡ ä»åã¯ãã WebSocketã«ããéä¿¡ åã åãååã®ç¶ãã§ãã ä»åã¯Cubeãã¯ãªãã¯ãããéã«ãHTTPãªã¯ã¨ã¹ãï¼POSTï¼ã§JSONãéä¿¡ãã¾ãã éçºç°â¦
Cubeãã¯ãªãã¯ããããã¨ãæ¤ç¥ HTTPãªã¯ã¨ã¹ãï¼GETï¼ã§JSONã®åå¾ ä»åã¯ãã HTTPãªã¯ã¨ã¹ãï¼POSTï¼ã§JSONã®éä¿¡ WebSocketã«ããéä¿¡ ååã®ç¶ãã§ãã ä»åã¯Cubeãã¯ãªãã¯ãããéã«ãHTTPãªã¯ã¨ã¹ãï¼GETï¼ã§JSONãåå¾ãã¾ãã Unityã¢ããªã«å â¦
developer.mozilla.orgMouseEvent.buttonã¨MouseEvent.movementXã»MouseEvent.movementYã使ãã¨ããã®ãããç°¡åã«è¦ç´ ããã©ãã°å¯è½ã«ãããã¨ãã§ãããã¨ãæããã¾ããã MouseEvent.buttonã使ã£ã¦ããã®ã§ã¹ãããã¯ããã¨ããã¿ããããã¤ã¹ã§ã¯åâ¦
ã²ãããªãã¨ããFirmataã¨Johnny-fiveã§è¡ããããªå¦çãèªä½ããã¨ãã話ã§ããhttps://www.arduino.cc/reference/en/libraries/firmata/www.arduino.cc johnny-five.ioMacã«æ¥ç¶ããArduinoã«å¯¾ãã¦ããã³çªå·ã¨0ã255ã®å¤ãã·ãªã¢ã«éä¿¡ã§éããã¨ã§ãArâ¦
MediaQueryListã®changeã¤ãã³ãã使ã£ã¦ãCSSã®ã¡ãã£ã¢ã¯ã¨ãªã使ã£ã¦æ¸ãã¦ããå¦çãJavaScriptã«ç§»æ¤ãã¦ã¿ã¾ããdeveloper.mozilla.org developer.mozilla.org CSSãã¼ã¸ã§ã³ï¼MediaQueryï¼ ã¦ã£ã³ãã¦å¹ ã375pxã¾ã§ã¯ãwindow.innerWidth HTML <p>window</p>â¦
å¨ã«ä¹ä¹ã®ãã¨ã好ãã«ãªã£ã¦ãããããè¯ããªã¨æããã表示ãããæ°åãç©ã«ãªãä¹ä¹ãå£é ã§çããä»çµã¿ããã¤ããã¾ãããæ£è§£ããã¨myCobotãé ·ãã¦ããã¾ãã pic.twitter.com/2X6w4uN04Fâ åå¡å²é« (@ki_230) 2024å¹´5æ22æ¥ ãã¡ãã®ä»çµã¿ãå®è£ ãâ¦
æãªããè¯ãããããªãã¿ã¤ãã«ã«ãã¦ãã¾ã£ããªãã¨æãã¾ãããJavaScriptã使ã£ã¦é³å£°ã§å ¥åãããæãç®ã®ç©ãæå¾ ããã¦ãããã®ãã©ããå¤å®ãã¾ããã¡ãªã¿ã«AIã«ã¿ã¤ãã«ãèãã¦ãããã¨ã JavaScriptã§ä¹ä¹ã®é³å£°å ¥åãå¤å® ä¹ä¹ã®ç©ãé³å£°å ¥åã§â¦
ã²ãããªãã¨ããããã©ã¦ã¶ã«æ¸ããææ¸ãã®æ°åã®èªèãç®æããã¨ã«ãã¾ããã ä»åã¯ãOpenAI APIã試ãã¦ã¿ã¾ããåååæ§ãææ¸ãã§æ°åãæ¸ãä»çµã¿ã¯ããã¤ã¦ä½ã£ããCanvasã«ç·ãå¼ããWebãµã¤ããæµç¨ãã¾ããblog.kimizuka.orgã¾ããOpenAIã®APIâ¦
ã²ãããªãã¨ããããã©ã¦ã¶ã«æ¸ããææ¸ãã®æ°åã®èªèãç®æããã¨ã«ãã¾ããã ã¾ãã¯ãtesseract.jsã試ãã¦ã¿ã¾ããtesseract.projectnaptha.com大åæã¨ãã¦ãææ¸ãã§æ°åãæ¸ãä»çµã¿ãå¿ è¦ãªã®ã§ããã¤ã¦ä½ã£ããCanvasã«ç·ãå¼ããWebãµã¤ããæµç¨â¦
åã åã®detailsè¦ç´ ã¨ååã®grid-template-rowsã®åããæã§ããblog.kimizuka.org blog.kimizuka.orgdetailsè¦ç´ ã®ééã«ã¢ãã¡ã¼ã·ã§ã³ãè¨å®ãããå ´åãæ¬å½ã¯openå±æ§ã®æç¡ã§åè¦ç´ ã®grid-template-rowsãå¤æ´ãããã¨ã§ãJavaScriptãªãã§å®ç¾ã§ããâ¦
Node.jsããPythonã¹ã¯ãªãããå®è¡ã§ããpython-shellã åã¯Node.jsã®ãµã¼ãããmyCobotãæä½ããéã«æ´»ç¨ãã¦ãã¾ããblog.kimizuka.orgåºæ¬çã«ã¯runStringã¡ã½ããã使ã£ã¦Pythonã§ã³ã¼ããå®è¡ãã¦ãã¾ãã ãã®ãããã·ã³ãã«ã«æ¸ãã¨ã import { Pyâ¦
ãã¤ã¦ãæååãé åã«åå²ä»£å ¥ãããã¨ã§çµµæåãå«ãã æååã®lengthãç°¡æçã«åå¾ãããã¨ãããã¾ãããblog.kimizuka.orgãµãã²ã¼ããã¢ã«å¯¾ãã¦ãString.prototype.lengthã§æååã®é·ããåå¾ãããã¨ããã¨ããã¾ããããªãã¨ããããã¾ããã coâ¦
noteãcodocãªã©ãæç« ã®éä¸ã«ææã¨ãªã¢ãè¨å®ã§ãããã©ãããã©ã¼ã ãå¢ãã¦ãã¾ããã 大ä½ã©ã®ãã©ãããã©ã¼ã ã§ã課éåããææã¨ãªã¢ã®æåæ°ãç¥ããã¨ãã§ããããã«ãã¶ã¤ã³ããã¦ãã¾ãã noteã§ã®ææã¨ãªã¢ã®æåæ°ã®æ示ãã®æåæ°ã«ã¦ã³ãâ¦