studyup 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (898) hide show
  1. package/hexgl-package/HexGL-master/.htaccess +4 -0
  2. package/hexgl-package/HexGL-master/LICENSE +21 -0
  3. package/hexgl-package/HexGL-master/README.md +26 -0
  4. package/hexgl-package/HexGL-master/audio/LICENSE +28 -0
  5. package/hexgl-package/HexGL-master/audio/bg.ogg +0 -0
  6. package/hexgl-package/HexGL-master/audio/boost.ogg +0 -0
  7. package/hexgl-package/HexGL-master/audio/crash.ogg +0 -0
  8. package/hexgl-package/HexGL-master/audio/destroyed.ogg +0 -0
  9. package/hexgl-package/HexGL-master/audio/wind.ogg +0 -0
  10. package/hexgl-package/HexGL-master/bkcore/Audio.js +142 -0
  11. package/hexgl-package/HexGL-master/bkcore/hexgl/CameraChase.js +73 -0
  12. package/hexgl-package/HexGL-master/bkcore/hexgl/Gameplay.js +231 -0
  13. package/hexgl-package/HexGL-master/bkcore/hexgl/HUD.js +270 -0
  14. package/hexgl-package/HexGL-master/bkcore/hexgl/HexGL.js +446 -0
  15. package/hexgl-package/HexGL-master/bkcore/hexgl/Ladder.js +52 -0
  16. package/hexgl-package/HexGL-master/bkcore/hexgl/RaceData.js +99 -0
  17. package/hexgl-package/HexGL-master/bkcore/hexgl/ShipControls.js +806 -0
  18. package/hexgl-package/HexGL-master/bkcore/hexgl/ShipEffects.js +186 -0
  19. package/hexgl-package/HexGL-master/bkcore/hexgl/tracks/Cityscape.js +521 -0
  20. package/hexgl-package/HexGL-master/bkcore/threejs/Loader.js +260 -0
  21. package/hexgl-package/HexGL-master/bkcore/threejs/Particles.js +191 -0
  22. package/hexgl-package/HexGL-master/bkcore/threejs/Preloader.js +151 -0
  23. package/hexgl-package/HexGL-master/bkcore/threejs/RenderManager.js +132 -0
  24. package/hexgl-package/HexGL-master/bkcore/threejs/Shaders.js +950 -0
  25. package/hexgl-package/HexGL-master/bkcore.coffee/ImageData.coffee +141 -0
  26. package/hexgl-package/HexGL-master/bkcore.coffee/ImageData.js +156 -0
  27. package/hexgl-package/HexGL-master/bkcore.coffee/Timer.coffee +118 -0
  28. package/hexgl-package/HexGL-master/bkcore.coffee/Timer.js +159 -0
  29. package/hexgl-package/HexGL-master/bkcore.coffee/Utils.coffee +193 -0
  30. package/hexgl-package/HexGL-master/bkcore.coffee/Utils.js +250 -0
  31. package/hexgl-package/HexGL-master/bkcore.coffee/controllers/GamepadController.coffee +45 -0
  32. package/hexgl-package/HexGL-master/bkcore.coffee/controllers/GamepadController.js +73 -0
  33. package/hexgl-package/HexGL-master/bkcore.coffee/controllers/OrientationController.coffee +72 -0
  34. package/hexgl-package/HexGL-master/bkcore.coffee/controllers/OrientationController.js +130 -0
  35. package/hexgl-package/HexGL-master/bkcore.coffee/controllers/TouchController.coffee +109 -0
  36. package/hexgl-package/HexGL-master/bkcore.coffee/controllers/TouchController.js +188 -0
  37. package/hexgl-package/HexGL-master/bkcore.coffee/tests.html +10 -0
  38. package/hexgl-package/HexGL-master/bkcore.coffee/threejs/Particles.coffee +199 -0
  39. package/hexgl-package/HexGL-master/bkcore.coffee/threejs/Particles.js +210 -0
  40. package/hexgl-package/HexGL-master/cache.appcache +74 -0
  41. package/hexgl-package/HexGL-master/css/BebasNeue-webfont.eot +0 -0
  42. package/hexgl-package/HexGL-master/css/BebasNeue-webfont.svg +245 -0
  43. package/hexgl-package/HexGL-master/css/BebasNeue-webfont.ttf +0 -0
  44. package/hexgl-package/HexGL-master/css/BebasNeue-webfont.woff +0 -0
  45. package/hexgl-package/HexGL-master/css/bg.jpg +0 -0
  46. package/hexgl-package/HexGL-master/css/fonts.css +16 -0
  47. package/hexgl-package/HexGL-master/css/help-0.png +0 -0
  48. package/hexgl-package/HexGL-master/css/help-1.png +0 -0
  49. package/hexgl-package/HexGL-master/css/help-2.png +0 -0
  50. package/hexgl-package/HexGL-master/css/help-3.png +0 -0
  51. package/hexgl-package/HexGL-master/css/mobile-controls-1.jpg +0 -0
  52. package/hexgl-package/HexGL-master/css/mobile-controls-2.jpg +0 -0
  53. package/hexgl-package/HexGL-master/css/mobile-over.jpg +0 -0
  54. package/hexgl-package/HexGL-master/css/mobile.jpg +0 -0
  55. package/hexgl-package/HexGL-master/css/multi.css +264 -0
  56. package/hexgl-package/HexGL-master/css/title.png +0 -0
  57. package/hexgl-package/HexGL-master/css/touchcontroller.css +8 -0
  58. package/hexgl-package/HexGL-master/favicon.png +0 -0
  59. package/hexgl-package/HexGL-master/geometries/bonus/base/base.js +45 -0
  60. package/hexgl-package/HexGL-master/geometries/booster/booster.js +45 -0
  61. package/hexgl-package/HexGL-master/geometries/ships/feisar/feisar.js +45 -0
  62. package/hexgl-package/HexGL-master/geometries/tracks/cityscape/bonus/speed.js +45 -0
  63. package/hexgl-package/HexGL-master/geometries/tracks/cityscape/scrapers1.js +45 -0
  64. package/hexgl-package/HexGL-master/geometries/tracks/cityscape/scrapers2.js +45 -0
  65. package/hexgl-package/HexGL-master/geometries/tracks/cityscape/start.js +45 -0
  66. package/hexgl-package/HexGL-master/geometries/tracks/cityscape/startbanner.js +45 -0
  67. package/hexgl-package/HexGL-master/geometries/tracks/cityscape/track.js +45 -0
  68. package/hexgl-package/HexGL-master/geometries/tracks/edge/track.js +38 -0
  69. package/hexgl-package/HexGL-master/icon_128.png +0 -0
  70. package/hexgl-package/HexGL-master/icon_256.png +0 -0
  71. package/hexgl-package/HexGL-master/icon_32.png +0 -0
  72. package/hexgl-package/HexGL-master/icon_64.png +0 -0
  73. package/hexgl-package/HexGL-master/index.html +129 -0
  74. package/hexgl-package/HexGL-master/launch.coffee +85 -0
  75. package/hexgl-package/HexGL-master/launch.js +116 -0
  76. package/hexgl-package/HexGL-master/libs/DAT.GUI.min.js +53 -0
  77. package/hexgl-package/HexGL-master/libs/Detector.js +59 -0
  78. package/hexgl-package/HexGL-master/libs/Editor.html +717 -0
  79. package/hexgl-package/HexGL-master/libs/Editor_files/App.js +212 -0
  80. package/hexgl-package/HexGL-master/libs/Editor_files/CanvasRenderer.js +389 -0
  81. package/hexgl-package/HexGL-master/libs/Editor_files/Diagram.js +148 -0
  82. package/hexgl-package/HexGL-master/libs/Editor_files/Iterator.js +92 -0
  83. package/hexgl-package/HexGL-master/libs/Editor_files/Links.js +56 -0
  84. package/hexgl-package/HexGL-master/libs/Editor_files/ModuleList.js +47 -0
  85. package/hexgl-package/HexGL-master/libs/Editor_files/Node.js +122 -0
  86. package/hexgl-package/HexGL-master/libs/Editor_files/Parser.js +140 -0
  87. package/hexgl-package/HexGL-master/libs/Editor_files/Project.js +162 -0
  88. package/hexgl-package/HexGL-master/libs/Editor_files/Timer.js +166 -0
  89. package/hexgl-package/HexGL-master/libs/Editor_files/ace.js +11 -0
  90. package/hexgl-package/HexGL-master/libs/Editor_files/class.js +989 -0
  91. package/hexgl-package/HexGL-master/libs/Editor_files/editor.css +16 -0
  92. package/hexgl-package/HexGL-master/libs/Editor_files/font.css +24 -0
  93. package/hexgl-package/HexGL-master/libs/Editor_files/gamecore.js +133 -0
  94. package/hexgl-package/HexGL-master/libs/Editor_files/hashlist.js +41 -0
  95. package/hexgl-package/HexGL-master/libs/Editor_files/jhashtable.js +468 -0
  96. package/hexgl-package/HexGL-master/libs/Editor_files/jquery-1.8.js +2 -0
  97. package/hexgl-package/HexGL-master/libs/Editor_files/kinetic.js +30 -0
  98. package/hexgl-package/HexGL-master/libs/Editor_files/main.css +204 -0
  99. package/hexgl-package/HexGL-master/libs/Editor_files/mode-json.js +1 -0
  100. package/hexgl-package/HexGL-master/libs/Editor_files/pooled.js +542 -0
  101. package/hexgl-package/HexGL-master/libs/Editor_files/theme-monokai.js +1 -0
  102. package/hexgl-package/HexGL-master/libs/ShaderExtras.js +1788 -0
  103. package/hexgl-package/HexGL-master/libs/Stats.js +6 -0
  104. package/hexgl-package/HexGL-master/libs/Three.dev.js +758 -0
  105. package/hexgl-package/HexGL-master/libs/Three.r53.js +767 -0
  106. package/hexgl-package/HexGL-master/libs/leap-0.4.1.min.js +3 -0
  107. package/hexgl-package/HexGL-master/libs/postprocessing/BloomPass.js +100 -0
  108. package/hexgl-package/HexGL-master/libs/postprocessing/DotScreenPass.js +52 -0
  109. package/hexgl-package/HexGL-master/libs/postprocessing/EffectComposer.js +143 -0
  110. package/hexgl-package/HexGL-master/libs/postprocessing/FilmPass.js +51 -0
  111. package/hexgl-package/HexGL-master/libs/postprocessing/MaskPass.js +86 -0
  112. package/hexgl-package/HexGL-master/libs/postprocessing/RenderPass.js +63 -0
  113. package/hexgl-package/HexGL-master/libs/postprocessing/SavePass.js +52 -0
  114. package/hexgl-package/HexGL-master/libs/postprocessing/ShaderPass.js +51 -0
  115. package/hexgl-package/HexGL-master/libs/postprocessing/TexturePass.js +37 -0
  116. package/hexgl-package/HexGL-master/manifest.webapp +18 -0
  117. package/hexgl-package/HexGL-master/package.webapp +10 -0
  118. package/hexgl-package/HexGL-master/package.zip +0 -0
  119. package/hexgl-package/HexGL-master/replays/cityscape-casual/bkcore.replay.json +1 -0
  120. package/hexgl-package/HexGL-master/textures/bonus/base/diffuse.jpg +0 -0
  121. package/hexgl-package/HexGL-master/textures/bonus/base/normal.jpg +0 -0
  122. package/hexgl-package/HexGL-master/textures/bonus/base/specular.jpg +0 -0
  123. package/hexgl-package/HexGL-master/textures/checker.png +0 -0
  124. package/hexgl-package/HexGL-master/textures/hud/hex.jpg +0 -0
  125. package/hexgl-package/HexGL-master/textures/hud/hud-bg.png +0 -0
  126. package/hexgl-package/HexGL-master/textures/hud/hud-fg-shield.png +0 -0
  127. package/hexgl-package/HexGL-master/textures/hud/hud-fg-speed.png +0 -0
  128. package/hexgl-package/HexGL-master/textures/particles/cloud - Copie.png +0 -0
  129. package/hexgl-package/HexGL-master/textures/particles/cloud.png +0 -0
  130. package/hexgl-package/HexGL-master/textures/particles/damage.png +0 -0
  131. package/hexgl-package/HexGL-master/textures/particles/spark - Copie.png +0 -0
  132. package/hexgl-package/HexGL-master/textures/particles/spark.png +0 -0
  133. package/hexgl-package/HexGL-master/textures/ships/feisar/booster/booster.png +0 -0
  134. package/hexgl-package/HexGL-master/textures/ships/feisar/booster/boostersprite.jpg +0 -0
  135. package/hexgl-package/HexGL-master/textures/ships/feisar/diffuse.jpg +0 -0
  136. package/hexgl-package/HexGL-master/textures/ships/feisar/normal.jpg +0 -0
  137. package/hexgl-package/HexGL-master/textures/ships/feisar/specular.jpg +0 -0
  138. package/hexgl-package/HexGL-master/textures/skybox/dawnclouds/nx.jpg +0 -0
  139. package/hexgl-package/HexGL-master/textures/skybox/dawnclouds/ny.jpg +0 -0
  140. package/hexgl-package/HexGL-master/textures/skybox/dawnclouds/nz.jpg +0 -0
  141. package/hexgl-package/HexGL-master/textures/skybox/dawnclouds/px.jpg +0 -0
  142. package/hexgl-package/HexGL-master/textures/skybox/dawnclouds/py.jpg +0 -0
  143. package/hexgl-package/HexGL-master/textures/skybox/dawnclouds/pz.jpg +0 -0
  144. package/hexgl-package/HexGL-master/textures/tracks/cityscape/collision.png +0 -0
  145. package/hexgl-package/HexGL-master/textures/tracks/cityscape/diffuse.jpg +0 -0
  146. package/hexgl-package/HexGL-master/textures/tracks/cityscape/height.png +0 -0
  147. package/hexgl-package/HexGL-master/textures/tracks/cityscape/normal.jpg +0 -0
  148. package/hexgl-package/HexGL-master/textures/tracks/cityscape/scrapers1/diffuse.jpg +0 -0
  149. package/hexgl-package/HexGL-master/textures/tracks/cityscape/scrapers1/normal.jpg +0 -0
  150. package/hexgl-package/HexGL-master/textures/tracks/cityscape/scrapers1/specular.jpg +0 -0
  151. package/hexgl-package/HexGL-master/textures/tracks/cityscape/scrapers2/diffuse.jpg +0 -0
  152. package/hexgl-package/HexGL-master/textures/tracks/cityscape/scrapers2/normal.jpg +0 -0
  153. package/hexgl-package/HexGL-master/textures/tracks/cityscape/scrapers2/specular.jpg +0 -0
  154. package/hexgl-package/HexGL-master/textures/tracks/cityscape/specular.jpg +0 -0
  155. package/hexgl-package/HexGL-master/textures/tracks/cityscape/start/diffuse.jpg +0 -0
  156. package/hexgl-package/HexGL-master/textures/tracks/cityscape/start/normal.jpg +0 -0
  157. package/hexgl-package/HexGL-master/textures/tracks/cityscape/start/specular.jpg +0 -0
  158. package/hexgl-package/HexGL-master/textures/tracks/cityscape/start/start.jpg +0 -0
  159. package/hexgl-package/HexGL-master/textures.full/bonus/base/diffuse.jpg +0 -0
  160. package/hexgl-package/HexGL-master/textures.full/bonus/base/normal.jpg +0 -0
  161. package/hexgl-package/HexGL-master/textures.full/bonus/base/specular.jpg +0 -0
  162. package/hexgl-package/HexGL-master/textures.full/checker.png +0 -0
  163. package/hexgl-package/HexGL-master/textures.full/hud/hex.jpg +0 -0
  164. package/hexgl-package/HexGL-master/textures.full/hud/hud-bg.png +0 -0
  165. package/hexgl-package/HexGL-master/textures.full/hud/hud-fg-shield.png +0 -0
  166. package/hexgl-package/HexGL-master/textures.full/hud/hud-fg-speed.png +0 -0
  167. package/hexgl-package/HexGL-master/textures.full/particles/cloud - Copie.png +0 -0
  168. package/hexgl-package/HexGL-master/textures.full/particles/cloud.png +0 -0
  169. package/hexgl-package/HexGL-master/textures.full/particles/damage.png +0 -0
  170. package/hexgl-package/HexGL-master/textures.full/particles/spark - Copie.png +0 -0
  171. package/hexgl-package/HexGL-master/textures.full/particles/spark.png +0 -0
  172. package/hexgl-package/HexGL-master/textures.full/ships/feisar/booster/booster.png +0 -0
  173. package/hexgl-package/HexGL-master/textures.full/ships/feisar/booster/boostersprite.jpg +0 -0
  174. package/hexgl-package/HexGL-master/textures.full/ships/feisar/diffuse.jpg +0 -0
  175. package/hexgl-package/HexGL-master/textures.full/ships/feisar/normal.jpg +0 -0
  176. package/hexgl-package/HexGL-master/textures.full/ships/feisar/specular.jpg +0 -0
  177. package/hexgl-package/HexGL-master/textures.full/skybox/dawnclouds/nx.jpg +0 -0
  178. package/hexgl-package/HexGL-master/textures.full/skybox/dawnclouds/ny.jpg +0 -0
  179. package/hexgl-package/HexGL-master/textures.full/skybox/dawnclouds/nz.jpg +0 -0
  180. package/hexgl-package/HexGL-master/textures.full/skybox/dawnclouds/px.jpg +0 -0
  181. package/hexgl-package/HexGL-master/textures.full/skybox/dawnclouds/py.jpg +0 -0
  182. package/hexgl-package/HexGL-master/textures.full/skybox/dawnclouds/pz.jpg +0 -0
  183. package/hexgl-package/HexGL-master/textures.full/tracks/cityscape/collision.png +0 -0
  184. package/hexgl-package/HexGL-master/textures.full/tracks/cityscape/diffuse.jpg +0 -0
  185. package/hexgl-package/HexGL-master/textures.full/tracks/cityscape/height.png +0 -0
  186. package/hexgl-package/HexGL-master/textures.full/tracks/cityscape/normal.jpg +0 -0
  187. package/hexgl-package/HexGL-master/textures.full/tracks/cityscape/scrapers1/diffuse.jpg +0 -0
  188. package/hexgl-package/HexGL-master/textures.full/tracks/cityscape/scrapers1/normal.jpg +0 -0
  189. package/hexgl-package/HexGL-master/textures.full/tracks/cityscape/scrapers1/specular.jpg +0 -0
  190. package/hexgl-package/HexGL-master/textures.full/tracks/cityscape/scrapers2/diffuse.jpg +0 -0
  191. package/hexgl-package/HexGL-master/textures.full/tracks/cityscape/scrapers2/normal.jpg +0 -0
  192. package/hexgl-package/HexGL-master/textures.full/tracks/cityscape/scrapers2/specular.jpg +0 -0
  193. package/hexgl-package/HexGL-master/textures.full/tracks/cityscape/specular.jpg +0 -0
  194. package/hexgl-package/HexGL-master/textures.full/tracks/cityscape/start/diffuse.jpg +0 -0
  195. package/hexgl-package/HexGL-master/textures.full/tracks/cityscape/start/normal.jpg +0 -0
  196. package/hexgl-package/HexGL-master/textures.full/tracks/cityscape/start/specular.jpg +0 -0
  197. package/hexgl-package/HexGL-master/textures.full/tracks/cityscape/start/start.jpg +0 -0
  198. package/index.html +291 -0
  199. package/package.json +12 -3
  200. package/sandboxels-package/sandboxels-1.13.2/.github/CONTRIBUTING.md +10 -0
  201. package/sandboxels-package/sandboxels-1.13.2/.github/FUNDING.yml +13 -0
  202. package/sandboxels-package/sandboxels-1.13.2/.github/SUPPORT.md +9 -0
  203. package/sandboxels-package/sandboxels-1.13.2/404.html +74 -0
  204. package/sandboxels-package/sandboxels-1.13.2/CITATION.cff +42 -0
  205. package/sandboxels-package/sandboxels-1.13.2/CNAME +1 -0
  206. package/sandboxels-package/sandboxels-1.13.2/README.md +47 -0
  207. package/sandboxels-package/sandboxels-1.13.2/SECURITY.md +9 -0
  208. package/sandboxels-package/sandboxels-1.13.2/ad.html +73 -0
  209. package/sandboxels-package/sandboxels-1.13.2/aff.json +3 -0
  210. package/sandboxels-package/sandboxels-1.13.2/archive/first-version.html +234 -0
  211. package/sandboxels-package/sandboxels-1.13.2/archive/second-version.html +1293 -0
  212. package/sandboxels-package/sandboxels-1.13.2/archive/third-version.html +2242 -0
  213. package/sandboxels-package/sandboxels-1.13.2/archive.txt +231 -0
  214. package/sandboxels-package/sandboxels-1.13.2/backgrounds/License.txt +1 -0
  215. package/sandboxels-package/sandboxels-1.13.2/backgrounds/sky.png +0 -0
  216. package/sandboxels-package/sandboxels-1.13.2/backgrounds/sky_dark.png +0 -0
  217. package/sandboxels-package/sandboxels-1.13.2/backgrounds/sky_grass.png +0 -0
  218. package/sandboxels-package/sandboxels-1.13.2/backgrounds/sky_pink.png +0 -0
  219. package/sandboxels-package/sandboxels-1.13.2/backgrounds/sky_purple.png +0 -0
  220. package/sandboxels-package/sandboxels-1.13.2/backgrounds/sky_warm.png +0 -0
  221. package/sandboxels-package/sandboxels-1.13.2/changelog.html +3362 -0
  222. package/sandboxels-package/sandboxels-1.13.2/changelog.txt +3096 -0
  223. package/sandboxels-package/sandboxels-1.13.2/controls.html +191 -0
  224. package/sandboxels-package/sandboxels-1.13.2/controls.txt +65 -0
  225. package/sandboxels-package/sandboxels-1.13.2/education-use.html +109 -0
  226. package/sandboxels-package/sandboxels-1.13.2/feed.rss +30 -0
  227. package/sandboxels-package/sandboxels-1.13.2/feedback.html +89 -0
  228. package/sandboxels-package/sandboxels-1.13.2/fonts/PressStart2P-License-OFL.txt +93 -0
  229. package/sandboxels-package/sandboxels-1.13.2/fonts/PressStart2P-Regular.ttf +0 -0
  230. package/sandboxels-package/sandboxels-1.13.2/fonts/VT323-License-OFL.txt +93 -0
  231. package/sandboxels-package/sandboxels-1.13.2/fonts/VT323-Regular.ttf +0 -0
  232. package/sandboxels-package/sandboxels-1.13.2/fonts/Vietnamese_Pixel.ttf +0 -0
  233. package/sandboxels-package/sandboxels-1.13.2/fonts/fusion-pixel-12px-monospaced-ja.ttf +0 -0
  234. package/sandboxels-package/sandboxels-1.13.2/fonts/fusion-pixel-12px-monospaced-ko.ttf +0 -0
  235. package/sandboxels-package/sandboxels-1.13.2/fonts/fusion-pixel-12px-monospaced-latin.ttf +0 -0
  236. package/sandboxels-package/sandboxels-1.13.2/fonts/fusion-pixel-12px-monospaced-zh_hans.ttf +0 -0
  237. package/sandboxels-package/sandboxels-1.13.2/fonts/fusion-pixel-12px-monospaced-zh_hant.ttf +0 -0
  238. package/sandboxels-package/sandboxels-1.13.2/help.html +122 -0
  239. package/sandboxels-package/sandboxels-1.13.2/icons/80x15.png +0 -0
  240. package/sandboxels-package/sandboxels-1.13.2/icons/88x31.png +0 -0
  241. package/sandboxels-package/sandboxels-1.13.2/icons/android-chrome-192x192.png +0 -0
  242. package/sandboxels-package/sandboxels-1.13.2/icons/android-chrome-384x384.png +0 -0
  243. package/sandboxels-package/sandboxels-1.13.2/icons/apple-touch-icon-114x114-precomposed.png +0 -0
  244. package/sandboxels-package/sandboxels-1.13.2/icons/apple-touch-icon-114x114.png +0 -0
  245. package/sandboxels-package/sandboxels-1.13.2/icons/apple-touch-icon-120x120-precomposed.png +0 -0
  246. package/sandboxels-package/sandboxels-1.13.2/icons/apple-touch-icon-120x120.png +0 -0
  247. package/sandboxels-package/sandboxels-1.13.2/icons/apple-touch-icon-144x144-precomposed.png +0 -0
  248. package/sandboxels-package/sandboxels-1.13.2/icons/apple-touch-icon-144x144.png +0 -0
  249. package/sandboxels-package/sandboxels-1.13.2/icons/apple-touch-icon-152x152-precomposed.png +0 -0
  250. package/sandboxels-package/sandboxels-1.13.2/icons/apple-touch-icon-152x152.png +0 -0
  251. package/sandboxels-package/sandboxels-1.13.2/icons/apple-touch-icon-180x180-precomposed.png +0 -0
  252. package/sandboxels-package/sandboxels-1.13.2/icons/apple-touch-icon-180x180.png +0 -0
  253. package/sandboxels-package/sandboxels-1.13.2/icons/apple-touch-icon-57x57-precomposed.png +0 -0
  254. package/sandboxels-package/sandboxels-1.13.2/icons/apple-touch-icon-57x57.png +0 -0
  255. package/sandboxels-package/sandboxels-1.13.2/icons/apple-touch-icon-60x60-precomposed.png +0 -0
  256. package/sandboxels-package/sandboxels-1.13.2/icons/apple-touch-icon-60x60.png +0 -0
  257. package/sandboxels-package/sandboxels-1.13.2/icons/apple-touch-icon-72x72-precomposed.png +0 -0
  258. package/sandboxels-package/sandboxels-1.13.2/icons/apple-touch-icon-72x72.png +0 -0
  259. package/sandboxels-package/sandboxels-1.13.2/icons/apple-touch-icon-76x76-precomposed.png +0 -0
  260. package/sandboxels-package/sandboxels-1.13.2/icons/apple-touch-icon-76x76.png +0 -0
  261. package/sandboxels-package/sandboxels-1.13.2/icons/apple-touch-icon-precomposed.png +0 -0
  262. package/sandboxels-package/sandboxels-1.13.2/icons/apple-touch-icon.png +0 -0
  263. package/sandboxels-package/sandboxels-1.13.2/icons/browserconfig.xml +9 -0
  264. package/sandboxels-package/sandboxels-1.13.2/icons/card.png +0 -0
  265. package/sandboxels-package/sandboxels-1.13.2/icons/cover-3840x1240px-text.png +0 -0
  266. package/sandboxels-package/sandboxels-1.13.2/icons/cover-3840x1240px.png +0 -0
  267. package/sandboxels-package/sandboxels-1.13.2/icons/cover-3840x1240px.webp +0 -0
  268. package/sandboxels-package/sandboxels-1.13.2/icons/cover.png +0 -0
  269. package/sandboxels-package/sandboxels-1.13.2/icons/favicon-16x16.png +0 -0
  270. package/sandboxels-package/sandboxels-1.13.2/icons/favicon-32x32.png +0 -0
  271. package/sandboxels-package/sandboxels-1.13.2/icons/favicon.ico +0 -0
  272. package/sandboxels-package/sandboxels-1.13.2/icons/icon-hd.png +0 -0
  273. package/sandboxels-package/sandboxels-1.13.2/icons/icon.png +0 -0
  274. package/sandboxels-package/sandboxels-1.13.2/icons/index.html +196 -0
  275. package/sandboxels-package/sandboxels-1.13.2/icons/modulator.png +0 -0
  276. package/sandboxels-package/sandboxels-1.13.2/icons/mstile-150x150.png +0 -0
  277. package/sandboxels-package/sandboxels-1.13.2/icons/original-logo-recreated-pixel.png +0 -0
  278. package/sandboxels-package/sandboxels-1.13.2/icons/promo1.png +0 -0
  279. package/sandboxels-package/sandboxels-1.13.2/icons/promo2.png +0 -0
  280. package/sandboxels-package/sandboxels-1.13.2/icons/promo3.png +0 -0
  281. package/sandboxels-package/sandboxels-1.13.2/icons/promo4.png +0 -0
  282. package/sandboxels-package/sandboxels-1.13.2/icons/safari-pinned-tab.svg +107 -0
  283. package/sandboxels-package/sandboxels-1.13.2/icons/site.webmanifest +20 -0
  284. package/sandboxels-package/sandboxels-1.13.2/icons/tall.webp +0 -0
  285. package/sandboxels-package/sandboxels-1.13.2/icons/wallpaper-old.png +0 -0
  286. package/sandboxels-package/sandboxels-1.13.2/icons/wallpaper.png +0 -0
  287. package/sandboxels-package/sandboxels-1.13.2/icons/wallpaper.webp +0 -0
  288. package/sandboxels-package/sandboxels-1.13.2/icons/wordmark-black.png +0 -0
  289. package/sandboxels-package/sandboxels-1.13.2/icons/wordmark-white.png +0 -0
  290. package/sandboxels-package/sandboxels-1.13.2/index.html +21523 -0
  291. package/sandboxels-package/sandboxels-1.13.2/lang/README.txt +5 -0
  292. package/sandboxels-package/sandboxels-1.13.2/lang/af.json +1 -0
  293. package/sandboxels-package/sandboxels-1.13.2/lang/ar.json +1 -0
  294. package/sandboxels-package/sandboxels-1.13.2/lang/ar_sy.json +1 -0
  295. package/sandboxels-package/sandboxels-1.13.2/lang/bn.json +1 -0
  296. package/sandboxels-package/sandboxels-1.13.2/lang/ca.json +1 -0
  297. package/sandboxels-package/sandboxels-1.13.2/lang/cs.json +1 -0
  298. package/sandboxels-package/sandboxels-1.13.2/lang/da.json +1 -0
  299. package/sandboxels-package/sandboxels-1.13.2/lang/de.json +1 -0
  300. package/sandboxels-package/sandboxels-1.13.2/lang/el.json +1 -0
  301. package/sandboxels-package/sandboxels-1.13.2/lang/en.json +1 -0
  302. package/sandboxels-package/sandboxels-1.13.2/lang/en_au.json +1 -0
  303. package/sandboxels-package/sandboxels-1.13.2/lang/en_ca.json +1 -0
  304. package/sandboxels-package/sandboxels-1.13.2/lang/en_gb.json +1 -0
  305. package/sandboxels-package/sandboxels-1.13.2/lang/es.json +1 -0
  306. package/sandboxels-package/sandboxels-1.13.2/lang/et.json +1 -0
  307. package/sandboxels-package/sandboxels-1.13.2/lang/fi.json +1 -0
  308. package/sandboxels-package/sandboxels-1.13.2/lang/fil.json +1 -0
  309. package/sandboxels-package/sandboxels-1.13.2/lang/fr.json +1 -0
  310. package/sandboxels-package/sandboxels-1.13.2/lang/gen.js +21 -0
  311. package/sandboxels-package/sandboxels-1.13.2/lang/he.json +1 -0
  312. package/sandboxels-package/sandboxels-1.13.2/lang/hu.json +1 -0
  313. package/sandboxels-package/sandboxels-1.13.2/lang/id.json +1 -0
  314. package/sandboxels-package/sandboxels-1.13.2/lang/it.json +1 -0
  315. package/sandboxels-package/sandboxels-1.13.2/lang/ja.json +1 -0
  316. package/sandboxels-package/sandboxels-1.13.2/lang/ko.json +1 -0
  317. package/sandboxels-package/sandboxels-1.13.2/lang/la.json +1 -0
  318. package/sandboxels-package/sandboxels-1.13.2/lang/ne.json +1 -0
  319. package/sandboxels-package/sandboxels-1.13.2/lang/nl.json +1 -0
  320. package/sandboxels-package/sandboxels-1.13.2/lang/no.json +1 -0
  321. package/sandboxels-package/sandboxels-1.13.2/lang/pl.json +1 -0
  322. package/sandboxels-package/sandboxels-1.13.2/lang/pt.json +1 -0
  323. package/sandboxels-package/sandboxels-1.13.2/lang/pt_br.json +1 -0
  324. package/sandboxels-package/sandboxels-1.13.2/lang/qha.json +1 -0
  325. package/sandboxels-package/sandboxels-1.13.2/lang/qvp.json +1 -0
  326. package/sandboxels-package/sandboxels-1.13.2/lang/ro.json +1 -0
  327. package/sandboxels-package/sandboxels-1.13.2/lang/ru.json +1 -0
  328. package/sandboxels-package/sandboxels-1.13.2/lang/sr.json +1 -0
  329. package/sandboxels-package/sandboxels-1.13.2/lang/sv.json +1 -0
  330. package/sandboxels-package/sandboxels-1.13.2/lang/template.json +677 -0
  331. package/sandboxels-package/sandboxels-1.13.2/lang/th.json +1 -0
  332. package/sandboxels-package/sandboxels-1.13.2/lang/tok.json +1 -0
  333. package/sandboxels-package/sandboxels-1.13.2/lang/tok_old.json +543 -0
  334. package/sandboxels-package/sandboxels-1.13.2/lang/tr.json +1 -0
  335. package/sandboxels-package/sandboxels-1.13.2/lang/uk.json +1 -0
  336. package/sandboxels-package/sandboxels-1.13.2/lang/vi.json +1 -0
  337. package/sandboxels-package/sandboxels-1.13.2/lang/xem.json +1 -0
  338. package/sandboxels-package/sandboxels-1.13.2/lang/zh_cn.json +1 -0
  339. package/sandboxels-package/sandboxels-1.13.2/lang/zh_hant.json +1 -0
  340. package/sandboxels-package/sandboxels-1.13.2/license.txt +48 -0
  341. package/sandboxels-package/sandboxels-1.13.2/lite.html +1599 -0
  342. package/sandboxels-package/sandboxels-1.13.2/manifest.json +33 -0
  343. package/sandboxels-package/sandboxels-1.13.2/media.html +134 -0
  344. package/sandboxels-package/sandboxels-1.13.2/mobile-use.html +110 -0
  345. package/sandboxels-package/sandboxels-1.13.2/mod-list.html +535 -0
  346. package/sandboxels-package/sandboxels-1.13.2/mods/1.10example.js +118 -0
  347. package/sandboxels-package/sandboxels-1.13.2/mods/10kelements.js +172 -0
  348. package/sandboxels-package/sandboxels-1.13.2/mods/3pms_mod.js +144 -0
  349. package/sandboxels-package/sandboxels-1.13.2/mods/AnonymousWorldgenLibrary.js +55 -0
  350. package/sandboxels-package/sandboxels-1.13.2/mods/Batteries.js +288 -0
  351. package/sandboxels-package/sandboxels-1.13.2/mods/BlueStuff.js +681 -0
  352. package/sandboxels-package/sandboxels-1.13.2/mods/CandyCanes.js +15 -0
  353. package/sandboxels-package/sandboxels-1.13.2/mods/CandyCorn.js +8 -0
  354. package/sandboxels-package/sandboxels-1.13.2/mods/CherrySoda.js +77 -0
  355. package/sandboxels-package/sandboxels-1.13.2/mods/EasterEggs.js +1 -0
  356. package/sandboxels-package/sandboxels-1.13.2/mods/ExtraMachines.js +2338 -0
  357. package/sandboxels-package/sandboxels-1.13.2/mods/FoodFoodFood.js +114 -0
  358. package/sandboxels-package/sandboxels-1.13.2/mods/Gemstones.js +80 -0
  359. package/sandboxels-package/sandboxels-1.13.2/mods/GrapeSoda.js +141 -0
  360. package/sandboxels-package/sandboxels-1.13.2/mods/Humanitize.js +959 -0
  361. package/sandboxels-package/sandboxels-1.13.2/mods/Inators.js +108 -0
  362. package/sandboxels-package/sandboxels-1.13.2/mods/IreThings.js +169 -0
  363. package/sandboxels-package/sandboxels-1.13.2/mods/Lab.js +397 -0
  364. package/sandboxels-package/sandboxels-1.13.2/mods/LimesAdditions.js +401 -0
  365. package/sandboxels-package/sandboxels-1.13.2/mods/MarkusFoodMod.js +334 -0
  366. package/sandboxels-package/sandboxels-1.13.2/mods/Mucho_frio_y_Calor.js +16 -0
  367. package/sandboxels-package/sandboxels-1.13.2/mods/Natural_disasters.js +207 -0
  368. package/sandboxels-package/sandboxels-1.13.2/mods/Neutronium Mod.js +1228 -0
  369. package/sandboxels-package/sandboxels-1.13.2/mods/PRNGworldgenlib.js +526 -0
  370. package/sandboxels-package/sandboxels-1.13.2/mods/Quicksand_one.js +1355 -0
  371. package/sandboxels-package/sandboxels-1.13.2/mods/RF_transmitter_receiver.js +62 -0
  372. package/sandboxels-package/sandboxels-1.13.2/mods/Random_quicksands.js +932 -0
  373. package/sandboxels-package/sandboxels-1.13.2/mods/Science_mod.js +1791 -0
  374. package/sandboxels-package/sandboxels-1.13.2/mods/Shroomboxels.js +71 -0
  375. package/sandboxels-package/sandboxels-1.13.2/mods/SuperASAX_Funny_Mod.js +297 -0
  376. package/sandboxels-package/sandboxels-1.13.2/mods/Temperature+.js +47 -0
  377. package/sandboxels-package/sandboxels-1.13.2/mods/Thread.js +180 -0
  378. package/sandboxels-package/sandboxels-1.13.2/mods/UAMM.js +502 -0
  379. package/sandboxels-package/sandboxels-1.13.2/mods/Ultra_Steel.js +61 -0
  380. package/sandboxels-package/sandboxels-1.13.2/mods/UwUify.js +87 -0
  381. package/sandboxels-package/sandboxels-1.13.2/mods/VCR_OSD_MONO.ttf +0 -0
  382. package/sandboxels-package/sandboxels-1.13.2/mods/Vegan.js +255 -0
  383. package/sandboxels-package/sandboxels-1.13.2/mods/WhisperingTheory.js +213 -0
  384. package/sandboxels-package/sandboxels-1.13.2/mods/aChefsDream.js +8159 -0
  385. package/sandboxels-package/sandboxels-1.13.2/mods/aChefsDream2.js +815 -0
  386. package/sandboxels-package/sandboxels-1.13.2/mods/aChefsDream_beta.js +12 -0
  387. package/sandboxels-package/sandboxels-1.13.2/mods/aScientistsWish.js +1195 -0
  388. package/sandboxels-package/sandboxels-1.13.2/mods/a_bundle_of_tests.js +417 -0
  389. package/sandboxels-package/sandboxels-1.13.2/mods/a_mod_by_alice.js +46043 -0
  390. package/sandboxels-package/sandboxels-1.13.2/mods/acid_and_shapes.js +1 -0
  391. package/sandboxels-package/sandboxels-1.13.2/mods/adaceythings.js +343 -0
  392. package/sandboxels-package/sandboxels-1.13.2/mods/adjustablepixelsize.js +28 -0
  393. package/sandboxels-package/sandboxels-1.13.2/mods/advanced_colonies.js +146 -0
  394. package/sandboxels-package/sandboxels-1.13.2/mods/advancedbugs.js +37 -0
  395. package/sandboxels-package/sandboxels-1.13.2/mods/aircrafts.js +260 -0
  396. package/sandboxels-package/sandboxels-1.13.2/mods/alchem.js +372 -0
  397. package/sandboxels-package/sandboxels-1.13.2/mods/alchemy.js +69 -0
  398. package/sandboxels-package/sandboxels-1.13.2/mods/alcohol.js +113 -0
  399. package/sandboxels-package/sandboxels-1.13.2/mods/alkahest.js +33 -0
  400. package/sandboxels-package/sandboxels-1.13.2/mods/alkali_metal.js +308 -0
  401. package/sandboxels-package/sandboxels-1.13.2/mods/all_around_fillers.js +73 -0
  402. package/sandboxels-package/sandboxels-1.13.2/mods/all_stain.js +7 -0
  403. package/sandboxels-package/sandboxels-1.13.2/mods/allliquids.js +24 -0
  404. package/sandboxels-package/sandboxels-1.13.2/mods/amogus.js +69 -0
  405. package/sandboxels-package/sandboxels-1.13.2/mods/anmm.js +566 -0
  406. package/sandboxels-package/sandboxels-1.13.2/mods/ants.js +137 -0
  407. package/sandboxels-package/sandboxels-1.13.2/mods/apioforms_pre.js +238 -0
  408. package/sandboxels-package/sandboxels-1.13.2/mods/applestuff.js +80 -0
  409. package/sandboxels-package/sandboxels-1.13.2/mods/asciiboxels.js +231 -0
  410. package/sandboxels-package/sandboxels-1.13.2/mods/aussieAdditions.js +123 -0
  411. package/sandboxels-package/sandboxels-1.13.2/mods/baby.js +65 -0
  412. package/sandboxels-package/sandboxels-1.13.2/mods/background_changer.js +59 -0
  413. package/sandboxels-package/sandboxels-1.13.2/mods/bacteria_mod.js +121 -0
  414. package/sandboxels-package/sandboxels-1.13.2/mods/bananas.js +543 -0
  415. package/sandboxels-package/sandboxels-1.13.2/mods/barf_mod.js +42 -0
  416. package/sandboxels-package/sandboxels-1.13.2/mods/barista.js +209 -0
  417. package/sandboxels-package/sandboxels-1.13.2/mods/bere.js +85 -0
  418. package/sandboxels-package/sandboxels-1.13.2/mods/betterMenuScreens.js +279 -0
  419. package/sandboxels-package/sandboxels-1.13.2/mods/betterModManager.js +174 -0
  420. package/sandboxels-package/sandboxels-1.13.2/mods/betterSettings.js +304 -0
  421. package/sandboxels-package/sandboxels-1.13.2/mods/betterStats.js +55 -0
  422. package/sandboxels-package/sandboxels-1.13.2/mods/better_smooth_water.js +6 -0
  423. package/sandboxels-package/sandboxels-1.13.2/mods/betterelec.js +51 -0
  424. package/sandboxels-package/sandboxels-1.13.2/mods/bettergraygoo.js +1 -0
  425. package/sandboxels-package/sandboxels-1.13.2/mods/bettermetalscrap.js +37 -0
  426. package/sandboxels-package/sandboxels-1.13.2/mods/bf.js +394 -0
  427. package/sandboxels-package/sandboxels-1.13.2/mods/bfdi.js +145 -0
  428. package/sandboxels-package/sandboxels-1.13.2/mods/bigger_star_spawners.js +198 -0
  429. package/sandboxels-package/sandboxels-1.13.2/mods/biology.js +8694 -0
  430. package/sandboxels-package/sandboxels-1.13.2/mods/bioooze_and_pyrogens.js +264 -0
  431. package/sandboxels-package/sandboxels-1.13.2/mods/black_hole.js +43 -0
  432. package/sandboxels-package/sandboxels-1.13.2/mods/blocks.js +164 -0
  433. package/sandboxels-package/sandboxels-1.13.2/mods/boiling_things.js +540 -0
  434. package/sandboxels-package/sandboxels-1.13.2/mods/bojithekings_mod.js +377 -0
  435. package/sandboxels-package/sandboxels-1.13.2/mods/boompaste.js +76 -0
  436. package/sandboxels-package/sandboxels-1.13.2/mods/borders.js +76 -0
  437. package/sandboxels-package/sandboxels-1.13.2/mods/bouncing_balls.js +703 -0
  438. package/sandboxels-package/sandboxels-1.13.2/mods/broken_mod_test.js +1 -0
  439. package/sandboxels-package/sandboxels-1.13.2/mods/building.js +154 -0
  440. package/sandboxels-package/sandboxels-1.13.2/mods/buildingreplicator.js +210 -0
  441. package/sandboxels-package/sandboxels-1.13.2/mods/c_fighter_jet.js +449 -0
  442. package/sandboxels-package/sandboxels-1.13.2/mods/cannibal_cooking.js +620 -0
  443. package/sandboxels-package/sandboxels-1.13.2/mods/cash_n_more.js +58 -0
  444. package/sandboxels-package/sandboxels-1.13.2/mods/cat.js +100 -0
  445. package/sandboxels-package/sandboxels-1.13.2/mods/cells.js +376 -0
  446. package/sandboxels-package/sandboxels-1.13.2/mods/chalcopyrite.js +124 -0
  447. package/sandboxels-package/sandboxels-1.13.2/mods/chalk.js +499 -0
  448. package/sandboxels-package/sandboxels-1.13.2/mods/change.js +58 -0
  449. package/sandboxels-package/sandboxels-1.13.2/mods/changePixelDebug.js +9 -0
  450. package/sandboxels-package/sandboxels-1.13.2/mods/changeTempReactionParameter.js +73 -0
  451. package/sandboxels-package/sandboxels-1.13.2/mods/chaos.js +32 -0
  452. package/sandboxels-package/sandboxels-1.13.2/mods/charsonsmodbeta.js +494 -0
  453. package/sandboxels-package/sandboxels-1.13.2/mods/charsonsmoduno.js +2116 -0
  454. package/sandboxels-package/sandboxels-1.13.2/mods/chem.js +7877 -0
  455. package/sandboxels-package/sandboxels-1.13.2/mods/chemFormula.js +44 -0
  456. package/sandboxels-package/sandboxels-1.13.2/mods/chemFormulas.json +549 -0
  457. package/sandboxels-package/sandboxels-1.13.2/mods/cherries.js +543 -0
  458. package/sandboxels-package/sandboxels-1.13.2/mods/chess.js +1463 -0
  459. package/sandboxels-package/sandboxels-1.13.2/mods/children.js +14 -0
  460. package/sandboxels-package/sandboxels-1.13.2/mods/circuitcore.js +1914 -0
  461. package/sandboxels-package/sandboxels-1.13.2/mods/circuitcore_displays.js +157 -0
  462. package/sandboxels-package/sandboxels-1.13.2/mods/citybuilding.js +193 -0
  463. package/sandboxels-package/sandboxels-1.13.2/mods/classic_explosives.js +62 -0
  464. package/sandboxels-package/sandboxels-1.13.2/mods/classic_textures.js +196 -0
  465. package/sandboxels-package/sandboxels-1.13.2/mods/clf3.js +86 -0
  466. package/sandboxels-package/sandboxels-1.13.2/mods/clone_liquid.js +22 -0
  467. package/sandboxels-package/sandboxels-1.13.2/mods/clouds.js +103 -0
  468. package/sandboxels-package/sandboxels-1.13.2/mods/cmur.js +5195 -0
  469. package/sandboxels-package/sandboxels-1.13.2/mods/code_library.js +1827 -0
  470. package/sandboxels-package/sandboxels-1.13.2/mods/coffee.js +228 -0
  471. package/sandboxels-package/sandboxels-1.13.2/mods/cold_liquid_explosion.js +20 -0
  472. package/sandboxels-package/sandboxels-1.13.2/mods/cold_opposites.js +66 -0
  473. package/sandboxels-package/sandboxels-1.13.2/mods/coldblooded.js +729 -0
  474. package/sandboxels-package/sandboxels-1.13.2/mods/collab_mod.js +253 -0
  475. package/sandboxels-package/sandboxels-1.13.2/mods/colonies.js +574 -0
  476. package/sandboxels-package/sandboxels-1.13.2/mods/colorLED.js +38 -0
  477. package/sandboxels-package/sandboxels-1.13.2/mods/color_everything.js +3 -0
  478. package/sandboxels-package/sandboxels-1.13.2/mods/color_tools.js +297 -0
  479. package/sandboxels-package/sandboxels-1.13.2/mods/colored_lightbulbs.js +44 -0
  480. package/sandboxels-package/sandboxels-1.13.2/mods/combustion.js +416 -0
  481. package/sandboxels-package/sandboxels-1.13.2/mods/community_desserts.js +829 -0
  482. package/sandboxels-package/sandboxels-1.13.2/mods/content.js +131 -0
  483. package/sandboxels-package/sandboxels-1.13.2/mods/controllable_pixel.js +75 -0
  484. package/sandboxels-package/sandboxels-1.13.2/mods/controllable_pixel_test.js +161 -0
  485. package/sandboxels-package/sandboxels-1.13.2/mods/conveyance.js +95 -0
  486. package/sandboxels-package/sandboxels-1.13.2/mods/cooked_apple.js +26 -0
  487. package/sandboxels-package/sandboxels-1.13.2/mods/cookie_clicker.js +943 -0
  488. package/sandboxels-package/sandboxels-1.13.2/mods/cookingnstuff.js +1 -0
  489. package/sandboxels-package/sandboxels-1.13.2/mods/cool_tools.js +35 -0
  490. package/sandboxels-package/sandboxels-1.13.2/mods/copy_canvas.js +9 -0
  491. package/sandboxels-package/sandboxels-1.13.2/mods/copypaste.js +100 -0
  492. package/sandboxels-package/sandboxels-1.13.2/mods/coresbyp.js +90 -0
  493. package/sandboxels-package/sandboxels-1.13.2/mods/cpt_alt.js +241 -0
  494. package/sandboxels-package/sandboxels-1.13.2/mods/crimson.js +424 -0
  495. package/sandboxels-package/sandboxels-1.13.2/mods/cs_expanded.js +31 -0
  496. package/sandboxels-package/sandboxels-1.13.2/mods/cubesstuff.js +3329 -0
  497. package/sandboxels-package/sandboxels-1.13.2/mods/currency.js +246 -0
  498. package/sandboxels-package/sandboxels-1.13.2/mods/cursed_shader_by_jayd.js +90 -0
  499. package/sandboxels-package/sandboxels-1.13.2/mods/cursor.js +3 -0
  500. package/sandboxels-package/sandboxels-1.13.2/mods/cursor_shapes.js +149 -0
  501. package/sandboxels-package/sandboxels-1.13.2/mods/customBackground.js +45 -0
  502. package/sandboxels-package/sandboxels-1.13.2/mods/customexplosion.js +110 -0
  503. package/sandboxels-package/sandboxels-1.13.2/mods/customtemptools.js +50 -0
  504. package/sandboxels-package/sandboxels-1.13.2/mods/dalgonacandy.js +41 -0
  505. package/sandboxels-package/sandboxels-1.13.2/mods/datawire.js +238 -0
  506. package/sandboxels-package/sandboxels-1.13.2/mods/date_test.js +268 -0
  507. package/sandboxels-package/sandboxels-1.13.2/mods/death_count.js +35 -0
  508. package/sandboxels-package/sandboxels-1.13.2/mods/debris.js +75 -0
  509. package/sandboxels-package/sandboxels-1.13.2/mods/debrisable.js +1136 -0
  510. package/sandboxels-package/sandboxels-1.13.2/mods/debugRework.js +169 -0
  511. package/sandboxels-package/sandboxels-1.13.2/mods/delete_all_of_element.js +17 -0
  512. package/sandboxels-package/sandboxels-1.13.2/mods/deneme.js +70 -0
  513. package/sandboxels-package/sandboxels-1.13.2/mods/dependency_test.js +13 -0
  514. package/sandboxels-package/sandboxels-1.13.2/mods/descriptions.js +17 -0
  515. package/sandboxels-package/sandboxels-1.13.2/mods/devsnacks.js +193 -0
  516. package/sandboxels-package/sandboxels-1.13.2/mods/devtests.js +278 -0
  517. package/sandboxels-package/sandboxels-1.13.2/mods/discord_port.js +36 -0
  518. package/sandboxels-package/sandboxels-1.13.2/mods/doElectricity changes.js +55 -0
  519. package/sandboxels-package/sandboxels-1.13.2/mods/dogs.js +85 -0
  520. package/sandboxels-package/sandboxels-1.13.2/mods/doom.js +935 -0
  521. package/sandboxels-package/sandboxels-1.13.2/mods/doomsday.js +56 -0
  522. package/sandboxels-package/sandboxels-1.13.2/mods/drawPixels_change_test.js +39 -0
  523. package/sandboxels-package/sandboxels-1.13.2/mods/dried_food.js +38 -0
  524. package/sandboxels-package/sandboxels-1.13.2/mods/drill.js +261 -0
  525. package/sandboxels-package/sandboxels-1.13.2/mods/drills.js +760 -0
  526. package/sandboxels-package/sandboxels-1.13.2/mods/easysurvival.js +917 -0
  527. package/sandboxels-package/sandboxels-1.13.2/mods/edible_everything.js +7 -0
  528. package/sandboxels-package/sandboxels-1.13.2/mods/editTools.js +608 -0
  529. package/sandboxels-package/sandboxels-1.13.2/mods/eklegems.js +1313 -0
  530. package/sandboxels-package/sandboxels-1.13.2/mods/electricityTest.js +42 -0
  531. package/sandboxels-package/sandboxels-1.13.2/mods/elem3.js +352316 -0
  532. package/sandboxels-package/sandboxels-1.13.2/mods/elementEraser.js +40 -0
  533. package/sandboxels-package/sandboxels-1.13.2/mods/element_UI.js +140 -0
  534. package/sandboxels-package/sandboxels-1.13.2/mods/elementreplacer.js +12 -0
  535. package/sandboxels-package/sandboxels-1.13.2/mods/elementsManager.js +1212 -0
  536. package/sandboxels-package/sandboxels-1.13.2/mods/empty.js +7 -0
  537. package/sandboxels-package/sandboxels-1.13.2/mods/evenmoretemptools.js +42 -0
  538. package/sandboxels-package/sandboxels-1.13.2/mods/example_mod.js +89 -0
  539. package/sandboxels-package/sandboxels-1.13.2/mods/example_mod_old.js +84 -0
  540. package/sandboxels-package/sandboxels-1.13.2/mods/exoplanet.js +220 -0
  541. package/sandboxels-package/sandboxels-1.13.2/mods/explodeAtPlus.js +138 -0
  542. package/sandboxels-package/sandboxels-1.13.2/mods/explosionsound.js +19 -0
  543. package/sandboxels-package/sandboxels-1.13.2/mods/extra_element_info.js +79 -0
  544. package/sandboxels-package/sandboxels-1.13.2/mods/extrasaveslots.js +42 -0
  545. package/sandboxels-package/sandboxels-1.13.2/mods/fans.js +204 -0
  546. package/sandboxels-package/sandboxels-1.13.2/mods/fantastic_creatures.js +198 -0
  547. package/sandboxels-package/sandboxels-1.13.2/mods/fantasy_elements.js +800 -0
  548. package/sandboxels-package/sandboxels-1.13.2/mods/fast_lightmap.js +339 -0
  549. package/sandboxels-package/sandboxels-1.13.2/mods/fey_and_more.js +1678 -0
  550. package/sandboxels-package/sandboxels-1.13.2/mods/fill_script.js +42 -0
  551. package/sandboxels-package/sandboxels-1.13.2/mods/find.js +115 -0
  552. package/sandboxels-package/sandboxels-1.13.2/mods/fine_tuned_cloner.js +121 -0
  553. package/sandboxels-package/sandboxels-1.13.2/mods/fire_extinguisher.js +128 -0
  554. package/sandboxels-package/sandboxels-1.13.2/mods/fire_mod.js +565 -0
  555. package/sandboxels-package/sandboxels-1.13.2/mods/fire_slime.js +68 -0
  556. package/sandboxels-package/sandboxels-1.13.2/mods/fishin.js +519 -0
  557. package/sandboxels-package/sandboxels-1.13.2/mods/fission.js +68 -0
  558. package/sandboxels-package/sandboxels-1.13.2/mods/fission_physics.js +86 -0
  559. package/sandboxels-package/sandboxels-1.13.2/mods/fiveys_stuff.js +119 -0
  560. package/sandboxels-package/sandboxels-1.13.2/mods/flesh_infection.js +645 -0
  561. package/sandboxels-package/sandboxels-1.13.2/mods/flipflop.js +36 -0
  562. package/sandboxels-package/sandboxels-1.13.2/mods/flowers_and_forests.js +468 -0
  563. package/sandboxels-package/sandboxels-1.13.2/mods/flying_fish.js +49 -0
  564. package/sandboxels-package/sandboxels-1.13.2/mods/food_mods.js +15 -0
  565. package/sandboxels-package/sandboxels-1.13.2/mods/foodgalore +100 -0
  566. package/sandboxels-package/sandboxels-1.13.2/mods/fools+.js +299 -0
  567. package/sandboxels-package/sandboxels-1.13.2/mods/fools.js +99 -0
  568. package/sandboxels-package/sandboxels-1.13.2/mods/fools24.js +842 -0
  569. package/sandboxels-package/sandboxels-1.13.2/mods/fools25.js +350 -0
  570. package/sandboxels-package/sandboxels-1.13.2/mods/fossils.js +676 -0
  571. package/sandboxels-package/sandboxels-1.13.2/mods/fractals.js +156 -0
  572. package/sandboxels-package/sandboxels-1.13.2/mods/franklin.js +44 -0
  573. package/sandboxels-package/sandboxels-1.13.2/mods/freeTPS.js +19 -0
  574. package/sandboxels-package/sandboxels-1.13.2/mods/fueled_generators.js +131 -0
  575. package/sandboxels-package/sandboxels-1.13.2/mods/funny elements 2022-11-15.js +84 -0
  576. package/sandboxels-package/sandboxels-1.13.2/mods/funny_liquid.js +618 -0
  577. package/sandboxels-package/sandboxels-1.13.2/mods/funny_liquid_2.js +322 -0
  578. package/sandboxels-package/sandboxels-1.13.2/mods/funny_liquid_3.js +254 -0
  579. package/sandboxels-package/sandboxels-1.13.2/mods/funny_solid.js +163 -0
  580. package/sandboxels-package/sandboxels-1.13.2/mods/funnynames.js +320 -0
  581. package/sandboxels-package/sandboxels-1.13.2/mods/fwibblen.js +69 -0
  582. package/sandboxels-package/sandboxels-1.13.2/mods/gambling.js +94 -0
  583. package/sandboxels-package/sandboxels-1.13.2/mods/gameOfLife.js +83 -0
  584. package/sandboxels-package/sandboxels-1.13.2/mods/garn47.js +325 -0
  585. package/sandboxels-package/sandboxels-1.13.2/mods/gasdecay.js +31 -0
  586. package/sandboxels-package/sandboxels-1.13.2/mods/generative_mods.js +2479 -0
  587. package/sandboxels-package/sandboxels-1.13.2/mods/generator_prompt.js +166 -0
  588. package/sandboxels-package/sandboxels-1.13.2/mods/genetics.js +4038 -0
  589. package/sandboxels-package/sandboxels-1.13.2/mods/glenn_gases.js +411 -0
  590. package/sandboxels-package/sandboxels-1.13.2/mods/glow.js +130 -0
  591. package/sandboxels-package/sandboxels-1.13.2/mods/gradient_background_support.js +21 -0
  592. package/sandboxels-package/sandboxels-1.13.2/mods/graphite.js +460 -0
  593. package/sandboxels-package/sandboxels-1.13.2/mods/grav_mudstones.js +382 -0
  594. package/sandboxels-package/sandboxels-1.13.2/mods/gravity.js +40 -0
  595. package/sandboxels-package/sandboxels-1.13.2/mods/gravity_test.js +51 -0
  596. package/sandboxels-package/sandboxels-1.13.2/mods/greenitemsandmore.js +183 -0
  597. package/sandboxels-package/sandboxels-1.13.2/mods/guided_rocket.js +106 -0
  598. package/sandboxels-package/sandboxels-1.13.2/mods/halogen.js +384 -0
  599. package/sandboxels-package/sandboxels-1.13.2/mods/haseulite.js +1673 -0
  600. package/sandboxels-package/sandboxels-1.13.2/mods/heatglow.js +74 -0
  601. package/sandboxels-package/sandboxels-1.13.2/mods/heatshield.js +30 -0
  602. package/sandboxels-package/sandboxels-1.13.2/mods/hexagon.js +45 -0
  603. package/sandboxels-package/sandboxels-1.13.2/mods/hidden_ground.js +42 -0
  604. package/sandboxels-package/sandboxels-1.13.2/mods/hideandshowtools.js +18 -0
  605. package/sandboxels-package/sandboxels-1.13.2/mods/human_edit.js +725 -0
  606. package/sandboxels-package/sandboxels-1.13.2/mods/human_friendly_design.js +899 -0
  607. package/sandboxels-package/sandboxels-1.13.2/mods/humans.js +203 -0
  608. package/sandboxels-package/sandboxels-1.13.2/mods/hydroid.js +224 -0
  609. package/sandboxels-package/sandboxels-1.13.2/mods/icb.js +32 -0
  610. package/sandboxels-package/sandboxels-1.13.2/mods/iean.js +135 -0
  611. package/sandboxels-package/sandboxels-1.13.2/mods/immune.js +199 -0
  612. package/sandboxels-package/sandboxels-1.13.2/mods/incinerators.js +29 -0
  613. package/sandboxels-package/sandboxels-1.13.2/mods/industry.js +308 -0
  614. package/sandboxels-package/sandboxels-1.13.2/mods/infLiqLight.js +8 -0
  615. package/sandboxels-package/sandboxels-1.13.2/mods/injector.js +450 -0
  616. package/sandboxels-package/sandboxels-1.13.2/mods/insane_random_events.js +123 -0
  617. package/sandboxels-package/sandboxels-1.13.2/mods/invertscroll.js +8 -0
  618. package/sandboxels-package/sandboxels-1.13.2/mods/invisible_things.js +83 -0
  619. package/sandboxels-package/sandboxels-1.13.2/mods/iocalfaeus_clones.js +100 -0
  620. package/sandboxels-package/sandboxels-1.13.2/mods/jaydsfunctions.js +187 -0
  621. package/sandboxels-package/sandboxels-1.13.2/mods/jaydsmods.js +89 -0
  622. package/sandboxels-package/sandboxels-1.13.2/mods/jaydstuff.js +783 -0
  623. package/sandboxels-package/sandboxels-1.13.2/mods/junction.js +50 -0
  624. package/sandboxels-package/sandboxels-1.13.2/mods/ketchup_mod.js +526 -0
  625. package/sandboxels-package/sandboxels-1.13.2/mods/kopalsBar.js +175 -0
  626. package/sandboxels-package/sandboxels-1.13.2/mods/kopalstuff.js +541 -0
  627. package/sandboxels-package/sandboxels-1.13.2/mods/lactose_intolerance_and_celiac.js +18 -0
  628. package/sandboxels-package/sandboxels-1.13.2/mods/laetium.js +328 -0
  629. package/sandboxels-package/sandboxels-1.13.2/mods/lattice_filler.js +29 -0
  630. package/sandboxels-package/sandboxels-1.13.2/mods/lemonade.js +71 -0
  631. package/sandboxels-package/sandboxels-1.13.2/mods/libhooktick.js +49 -0
  632. package/sandboxels-package/sandboxels-1.13.2/mods/libpacman-v1.js +61 -0
  633. package/sandboxels-package/sandboxels-1.13.2/mods/libpixeltracking.js +29 -0
  634. package/sandboxels-package/sandboxels-1.13.2/mods/library_test.js +5 -0
  635. package/sandboxels-package/sandboxels-1.13.2/mods/life_eater.js +169 -0
  636. package/sandboxels-package/sandboxels-1.13.2/mods/light.js +218 -0
  637. package/sandboxels-package/sandboxels-1.13.2/mods/lighting_test.js +79 -0
  638. package/sandboxels-package/sandboxels-1.13.2/mods/lightmap.js +382 -0
  639. package/sandboxels-package/sandboxels-1.13.2/mods/limewater.js +75 -0
  640. package/sandboxels-package/sandboxels-1.13.2/mods/liquid_energy.js +294 -0
  641. package/sandboxels-package/sandboxels-1.13.2/mods/liquid_mixing.js +184 -0
  642. package/sandboxels-package/sandboxels-1.13.2/mods/liquid_void.js +29 -0
  643. package/sandboxels-package/sandboxels-1.13.2/mods/littlejohnny.js +72 -0
  644. package/sandboxels-package/sandboxels-1.13.2/mods/lizard_mod.js +91 -0
  645. package/sandboxels-package/sandboxels-1.13.2/mods/logicgates.js +482 -0
  646. package/sandboxels-package/sandboxels-1.13.2/mods/lone_urea.js +69 -0
  647. package/sandboxels-package/sandboxels-1.13.2/mods/lost_souls.js +177 -0
  648. package/sandboxels-package/sandboxels-1.13.2/mods/lye.js +34 -0
  649. package/sandboxels-package/sandboxels-1.13.2/mods/machines.js +293 -0
  650. package/sandboxels-package/sandboxels-1.13.2/mods/manyMoreThemes.js +67 -0
  651. package/sandboxels-package/sandboxels-1.13.2/mods/mars.js +473 -0
  652. package/sandboxels-package/sandboxels-1.13.2/mods/maxColorOffset.js +54 -0
  653. package/sandboxels-package/sandboxels-1.13.2/mods/maze.js +71 -0
  654. package/sandboxels-package/sandboxels-1.13.2/mods/meat_rockets.js +70 -0
  655. package/sandboxels-package/sandboxels-1.13.2/mods/memelists.js +17 -0
  656. package/sandboxels-package/sandboxels-1.13.2/mods/metals.js +791 -0
  657. package/sandboxels-package/sandboxels-1.13.2/mods/minecraft.js +818 -0
  658. package/sandboxels-package/sandboxels-1.13.2/mods/minesweeper.js +100 -0
  659. package/sandboxels-package/sandboxels-1.13.2/mods/miscellaneous_elements.js +278 -0
  660. package/sandboxels-package/sandboxels-1.13.2/mods/miscible_psoup_and_birthpool.js +7 -0
  661. package/sandboxels-package/sandboxels-1.13.2/mods/mix.js +65 -0
  662. package/sandboxels-package/sandboxels-1.13.2/mods/mixture.js +714 -0
  663. package/sandboxels-package/sandboxels-1.13.2/mods/mixtureII.js +440 -0
  664. package/sandboxels-package/sandboxels-1.13.2/mods/mjsstuff.js +233 -0
  665. package/sandboxels-package/sandboxels-1.13.2/mods/mobile_keybinds.js +33 -0
  666. package/sandboxels-package/sandboxels-1.13.2/mods/mobile_shift.js +336 -0
  667. package/sandboxels-package/sandboxels-1.13.2/mods/mobs.js +5147 -0
  668. package/sandboxels-package/sandboxels-1.13.2/mods/mod_for_mnem.js +1 -0
  669. package/sandboxels-package/sandboxels-1.13.2/mods/modlangs.js +53 -0
  670. package/sandboxels-package/sandboxels-1.13.2/mods/moreViews.js +473 -0
  671. package/sandboxels-package/sandboxels-1.13.2/mods/more_art_states.js +89 -0
  672. package/sandboxels-package/sandboxels-1.13.2/mods/more_breaking.js +189 -0
  673. package/sandboxels-package/sandboxels-1.13.2/mods/more_disasters.js +497 -0
  674. package/sandboxels-package/sandboxels-1.13.2/mods/more_gold.js +115 -0
  675. package/sandboxels-package/sandboxels-1.13.2/mods/morebombs.js +1143 -0
  676. package/sandboxels-package/sandboxels-1.13.2/mods/morechemistry.js +1764 -0
  677. package/sandboxels-package/sandboxels-1.13.2/mods/morefoodsmod.js +154 -0
  678. package/sandboxels-package/sandboxels-1.13.2/mods/moreliquids.js +138 -0
  679. package/sandboxels-package/sandboxels-1.13.2/mods/morepowders.js +335 -0
  680. package/sandboxels-package/sandboxels-1.13.2/mods/moretools.js +68 -0
  681. package/sandboxels-package/sandboxels-1.13.2/mods/moretrees.js +490 -0
  682. package/sandboxels-package/sandboxels-1.13.2/mods/mossstuff.js +2301 -0
  683. package/sandboxels-package/sandboxels-1.13.2/mods/mouthwash.js +23 -0
  684. package/sandboxels-package/sandboxels-1.13.2/mods/move_tools.js +71 -0
  685. package/sandboxels-package/sandboxels-1.13.2/mods/moveable_cubes.js +258 -0
  686. package/sandboxels-package/sandboxels-1.13.2/mods/moving_pixels.js +179 -0
  687. package/sandboxels-package/sandboxels-1.13.2/mods/mush_infection.js +321 -0
  688. package/sandboxels-package/sandboxels-1.13.2/mods/musicalfruit.js +4 -0
  689. package/sandboxels-package/sandboxels-1.13.2/mods/mustard.js +48 -0
  690. package/sandboxels-package/sandboxels-1.13.2/mods/mystic.js +274 -0
  691. package/sandboxels-package/sandboxels-1.13.2/mods/nastystuff.js +57 -0
  692. package/sandboxels-package/sandboxels-1.13.2/mods/nature_Mod.js +1384 -0
  693. package/sandboxels-package/sandboxels-1.13.2/mods/nekonicos_stuff.js +1651 -0
  694. package/sandboxels-package/sandboxels-1.13.2/mods/nested_for_reaction_example.js +19 -0
  695. package/sandboxels-package/sandboxels-1.13.2/mods/nettysaddon.js +48 -0
  696. package/sandboxels-package/sandboxels-1.13.2/mods/neutronium_compressor.js +416 -0
  697. package/sandboxels-package/sandboxels-1.13.2/mods/nicer_flame.js +48 -0
  698. package/sandboxels-package/sandboxels-1.13.2/mods/nirmod.js +296 -0
  699. package/sandboxels-package/sandboxels-1.13.2/mods/nitroglycerin.js +54 -0
  700. package/sandboxels-package/sandboxels-1.13.2/mods/no_blood.js +23 -0
  701. package/sandboxels-package/sandboxels-1.13.2/mods/no_radiation_events.js +3 -0
  702. package/sandboxels-package/sandboxels-1.13.2/mods/no_random_grbs.js +9 -0
  703. package/sandboxels-package/sandboxels-1.13.2/mods/no_scroll.js +5 -0
  704. package/sandboxels-package/sandboxels-1.13.2/mods/noblegas.js +215 -0
  705. package/sandboxels-package/sandboxels-1.13.2/mods/nocancer.js +9 -0
  706. package/sandboxels-package/sandboxels-1.13.2/mods/nocancer2.js +1 -0
  707. package/sandboxels-package/sandboxels-1.13.2/mods/noconfirm.js +1 -0
  708. package/sandboxels-package/sandboxels-1.13.2/mods/nograssgrow.js +6 -0
  709. package/sandboxels-package/sandboxels-1.13.2/mods/noita.js +4895 -0
  710. package/sandboxels-package/sandboxels-1.13.2/mods/noita_demake.js +430 -0
  711. package/sandboxels-package/sandboxels-1.13.2/mods/nopixellimit.js +2 -0
  712. package/sandboxels-package/sandboxels-1.13.2/mods/note_block.js +97 -0
  713. package/sandboxels-package/sandboxels-1.13.2/mods/note_block_advanced.js +628 -0
  714. package/sandboxels-package/sandboxels-1.13.2/mods/nousersthings.js +4081 -0
  715. package/sandboxels-package/sandboxels-1.13.2/mods/nuclear.js +300 -0
  716. package/sandboxels-package/sandboxels-1.13.2/mods/nv7.js +35013 -0
  717. package/sandboxels-package/sandboxels-1.13.2/mods/obsidian.js +51 -0
  718. package/sandboxels-package/sandboxels-1.13.2/mods/occlusion.js +149 -0
  719. package/sandboxels-package/sandboxels-1.13.2/mods/ocean.js +130 -0
  720. package/sandboxels-package/sandboxels-1.13.2/mods/ochem_prerelease.js +774 -0
  721. package/sandboxels-package/sandboxels-1.13.2/mods/oldTooltip.js +23 -0
  722. package/sandboxels-package/sandboxels-1.13.2/mods/oldleds.js +20 -0
  723. package/sandboxels-package/sandboxels-1.13.2/mods/onTryMoveInto.js +85 -0
  724. package/sandboxels-package/sandboxels-1.13.2/mods/onecolor.js +146 -0
  725. package/sandboxels-package/sandboxels-1.13.2/mods/orchidslibrary.js +70 -0
  726. package/sandboxels-package/sandboxels-1.13.2/mods/ores.js +232 -0
  727. package/sandboxels-package/sandboxels-1.13.2/mods/organism.js +915 -0
  728. package/sandboxels-package/sandboxels-1.13.2/mods/oxide.theme.js +46 -0
  729. package/sandboxels-package/sandboxels-1.13.2/mods/page_color.js +35 -0
  730. package/sandboxels-package/sandboxels-1.13.2/mods/paint_event.js +17 -0
  731. package/sandboxels-package/sandboxels-1.13.2/mods/periodic_and_more.js +64 -0
  732. package/sandboxels-package/sandboxels-1.13.2/mods/peta.js +214 -0
  733. package/sandboxels-package/sandboxels-1.13.2/mods/petal_dye.js +40 -0
  734. package/sandboxels-package/sandboxels-1.13.2/mods/pixelResizeTool.js +18 -0
  735. package/sandboxels-package/sandboxels-1.13.2/mods/pizzasstuff.js +2338 -0
  736. package/sandboxels-package/sandboxels-1.13.2/mods/place_all_elements.js +30 -0
  737. package/sandboxels-package/sandboxels-1.13.2/mods/placuchtestthing.js +17 -0
  738. package/sandboxels-package/sandboxels-1.13.2/mods/planet.js +270 -0
  739. package/sandboxels-package/sandboxels-1.13.2/mods/planet_cracker.js +81 -0
  740. package/sandboxels-package/sandboxels-1.13.2/mods/plants.js +1616 -0
  741. package/sandboxels-package/sandboxels-1.13.2/mods/plastic.js +93 -0
  742. package/sandboxels-package/sandboxels-1.13.2/mods/portal.js +120 -0
  743. package/sandboxels-package/sandboxels-1.13.2/mods/potato_chips.js +44 -0
  744. package/sandboxels-package/sandboxels-1.13.2/mods/prairie.js +200 -0
  745. package/sandboxels-package/sandboxels-1.13.2/mods/precisionDrawing.js +58 -0
  746. package/sandboxels-package/sandboxels-1.13.2/mods/pressure.js +223 -0
  747. package/sandboxels-package/sandboxels-1.13.2/mods/pressure_sensitive.js +20 -0
  748. package/sandboxels-package/sandboxels-1.13.2/mods/prideflags.js +307 -0
  749. package/sandboxels-package/sandboxels-1.13.2/mods/primordial_birthpool.js +38 -0
  750. package/sandboxels-package/sandboxels-1.13.2/mods/prompt.js +1215 -0
  751. package/sandboxels-package/sandboxels-1.13.2/mods/prop and prompt variables.js +16 -0
  752. package/sandboxels-package/sandboxels-1.13.2/mods/prop.js +466 -0
  753. package/sandboxels-package/sandboxels-1.13.2/mods/pullers.js +479 -0
  754. package/sandboxels-package/sandboxels-1.13.2/mods/purple_guys_mod.js +3635 -0
  755. package/sandboxels-package/sandboxels-1.13.2/mods/pushers.js +287 -0
  756. package/sandboxels-package/sandboxels-1.13.2/mods/radioactive.js +135 -0
  757. package/sandboxels-package/sandboxels-1.13.2/mods/rainbow_cursor.js +12 -0
  758. package/sandboxels-package/sandboxels-1.13.2/mods/rainbow_tests.js +348 -0
  759. package/sandboxels-package/sandboxels-1.13.2/mods/rainsmod.js +412 -0
  760. package/sandboxels-package/sandboxels-1.13.2/mods/random_elems.js +463 -0
  761. package/sandboxels-package/sandboxels-1.13.2/mods/random_everything.js +7 -0
  762. package/sandboxels-package/sandboxels-1.13.2/mods/random_fixes.js +42 -0
  763. package/sandboxels-package/sandboxels-1.13.2/mods/random_liquids.js +220 -0
  764. package/sandboxels-package/sandboxels-1.13.2/mods/random_rocks.js +164 -0
  765. package/sandboxels-package/sandboxels-1.13.2/mods/random_things.js +69 -0
  766. package/sandboxels-package/sandboxels-1.13.2/mods/randomelements.js +200 -0
  767. package/sandboxels-package/sandboxels-1.13.2/mods/randomness.js +730 -0
  768. package/sandboxels-package/sandboxels-1.13.2/mods/randomness_but_tick.js +1257 -0
  769. package/sandboxels-package/sandboxels-1.13.2/mods/randomness_but_tool.js +26 -0
  770. package/sandboxels-package/sandboxels-1.13.2/mods/ray_cloner.js +150 -0
  771. package/sandboxels-package/sandboxels-1.13.2/mods/rays++.js +60 -0
  772. package/sandboxels-package/sandboxels-1.13.2/mods/rays.js +464 -0
  773. package/sandboxels-package/sandboxels-1.13.2/mods/reactor_supplies_and_others.js +88 -0
  774. package/sandboxels-package/sandboxels-1.13.2/mods/real_light.js +754 -0
  775. package/sandboxels-package/sandboxels-1.13.2/mods/replace.js +79 -0
  776. package/sandboxels-package/sandboxels-1.13.2/mods/replace_all.js +45 -0
  777. package/sandboxels-package/sandboxels-1.13.2/mods/reverse_time.js +421 -0
  778. package/sandboxels-package/sandboxels-1.13.2/mods/rich_grain.js +54 -0
  779. package/sandboxels-package/sandboxels-1.13.2/mods/rising_powders.js +3 -0
  780. package/sandboxels-package/sandboxels-1.13.2/mods/rock_paper_scissors.js +32 -0
  781. package/sandboxels-package/sandboxels-1.13.2/mods/roseyiede.js +363 -0
  782. package/sandboxels-package/sandboxels-1.13.2/mods/rpg.js +1342 -0
  783. package/sandboxels-package/sandboxels-1.13.2/mods/ru_expanded.js +25 -0
  784. package/sandboxels-package/sandboxels-1.13.2/mods/runAfterAutogen and onload restructure.js +1 -0
  785. package/sandboxels-package/sandboxels-1.13.2/mods/runAfterAutogen2.js +56 -0
  786. package/sandboxels-package/sandboxels-1.13.2/mods/sandboxels.js +2501 -0
  787. package/sandboxels-package/sandboxels-1.13.2/mods/saturnsstuff.js +729 -0
  788. package/sandboxels-package/sandboxels-1.13.2/mods/save_loading.js +520 -0
  789. package/sandboxels-package/sandboxels-1.13.2/mods/sbmixup.js +1439 -0
  790. package/sandboxels-package/sandboxels-1.13.2/mods/sbstuff.js +1865 -0
  791. package/sandboxels-package/sandboxels-1.13.2/mods/scenexe.js +770 -0
  792. package/sandboxels-package/sandboxels-1.13.2/mods/schematics.js +214 -0
  793. package/sandboxels-package/sandboxels-1.13.2/mods/scp.js +7831 -0
  794. package/sandboxels-package/sandboxels-1.13.2/mods/selective_paint.js +60 -0
  795. package/sandboxels-package/sandboxels-1.13.2/mods/sensitive.js +20 -0
  796. package/sandboxels-package/sandboxels-1.13.2/mods/shade.js +46 -0
  797. package/sandboxels-package/sandboxels-1.13.2/mods/shader_by_jayd.js +168 -0
  798. package/sandboxels-package/sandboxels-1.13.2/mods/shipstuff.js +198 -0
  799. package/sandboxels-package/sandboxels-1.13.2/mods/singleColor.js +1 -0
  800. package/sandboxels-package/sandboxels-1.13.2/mods/single_humans.js +147 -0
  801. package/sandboxels-package/sandboxels-1.13.2/mods/sky.js +141 -0
  802. package/sandboxels-package/sandboxels-1.13.2/mods/slag_fix.js +25 -0
  803. package/sandboxels-package/sandboxels-1.13.2/mods/smooth_water.js +6 -0
  804. package/sandboxels-package/sandboxels-1.13.2/mods/solid_rock.js +74 -0
  805. package/sandboxels-package/sandboxels-1.13.2/mods/solidcolor.js +146 -0
  806. package/sandboxels-package/sandboxels-1.13.2/mods/solubility.js +287 -0
  807. package/sandboxels-package/sandboxels-1.13.2/mods/some_tf_liquids.js +358 -0
  808. package/sandboxels-package/sandboxels-1.13.2/mods/souls.js +163 -0
  809. package/sandboxels-package/sandboxels-1.13.2/mods/soups.js +104 -0
  810. package/sandboxels-package/sandboxels-1.13.2/mods/spaceship.js +138 -0
  811. package/sandboxels-package/sandboxels-1.13.2/mods/special_property_library.js +155 -0
  812. package/sandboxels-package/sandboxels-1.13.2/mods/sponge_edit.js +76 -0
  813. package/sandboxels-package/sandboxels-1.13.2/mods/sports_beta.js +69 -0
  814. package/sandboxels-package/sandboxels-1.13.2/mods/spouts.js +715 -0
  815. package/sandboxels-package/sandboxels-1.13.2/mods/spring.js +283 -0
  816. package/sandboxels-package/sandboxels-1.13.2/mods/stainless_steel.js +126 -0
  817. package/sandboxels-package/sandboxels-1.13.2/mods/star_wars.js +70 -0
  818. package/sandboxels-package/sandboxels-1.13.2/mods/state_voids.js +347 -0
  819. package/sandboxels-package/sandboxels-1.13.2/mods/static.js +182 -0
  820. package/sandboxels-package/sandboxels-1.13.2/mods/stickyslime.js +3 -0
  821. package/sandboxels-package/sandboxels-1.13.2/mods/stickystuff.js +59 -0
  822. package/sandboxels-package/sandboxels-1.13.2/mods/stormlib.js +99 -0
  823. package/sandboxels-package/sandboxels-1.13.2/mods/stripe_paint.js +110 -0
  824. package/sandboxels-package/sandboxels-1.13.2/mods/structure_test.js +755 -0
  825. package/sandboxels-package/sandboxels-1.13.2/mods/sturdierpowders.js +595 -0
  826. package/sandboxels-package/sandboxels-1.13.2/mods/subspace.js +46 -0
  827. package/sandboxels-package/sandboxels-1.13.2/mods/survival.js +499 -0
  828. package/sandboxels-package/sandboxels-1.13.2/mods/survivalhack.js +500 -0
  829. package/sandboxels-package/sandboxels-1.13.2/mods/sus.js +92 -0
  830. package/sandboxels-package/sandboxels-1.13.2/mods/switches.js +53 -0
  831. package/sandboxels-package/sandboxels-1.13.2/mods/talismanadditions.js +124 -0
  832. package/sandboxels-package/sandboxels-1.13.2/mods/tech.js +282 -0
  833. package/sandboxels-package/sandboxels-1.13.2/mods/test.js +8 -0
  834. package/sandboxels-package/sandboxels-1.13.2/mods/test_2.js +399 -0
  835. package/sandboxels-package/sandboxels-1.13.2/mods/testmod.js +7 -0
  836. package/sandboxels-package/sandboxels-1.13.2/mods/text.js +681 -0
  837. package/sandboxels-package/sandboxels-1.13.2/mods/texture_pack_by_jayd.js +116 -0
  838. package/sandboxels-package/sandboxels-1.13.2/mods/texturepack.js +94 -0
  839. package/sandboxels-package/sandboxels-1.13.2/mods/the_ground.js +3 -0
  840. package/sandboxels-package/sandboxels-1.13.2/mods/the_ground_og.js +2570 -0
  841. package/sandboxels-package/sandboxels-1.13.2/mods/the_snail.js +63 -0
  842. package/sandboxels-package/sandboxels-1.13.2/mods/themostrandomstuff.js +523 -0
  843. package/sandboxels-package/sandboxels-1.13.2/mods/thermal_conduit.js +157 -0
  844. package/sandboxels-package/sandboxels-1.13.2/mods/thiquovite.js +1745 -0
  845. package/sandboxels-package/sandboxels-1.13.2/mods/ticking_temp_stuff.js +494 -0
  846. package/sandboxels-package/sandboxels-1.13.2/mods/time.js +7 -0
  847. package/sandboxels-package/sandboxels-1.13.2/mods/toms_stuff.js +308 -0
  848. package/sandboxels-package/sandboxels-1.13.2/mods/tool_pixel_behavior.js +792 -0
  849. package/sandboxels-package/sandboxels-1.13.2/mods/tooltip.js +32 -0
  850. package/sandboxels-package/sandboxels-1.13.2/mods/toothpaste.js +154 -0
  851. package/sandboxels-package/sandboxels-1.13.2/mods/tpt.js +89 -0
  852. package/sandboxels-package/sandboxels-1.13.2/mods/triggerable_random_powders.js +68 -0
  853. package/sandboxels-package/sandboxels-1.13.2/mods/troll.js +170 -0
  854. package/sandboxels-package/sandboxels-1.13.2/mods/true_flashbang.js +520 -0
  855. package/sandboxels-package/sandboxels-1.13.2/mods/ultimadrink.js +3191 -0
  856. package/sandboxels-package/sandboxels-1.13.2/mods/uncook.js +51 -0
  857. package/sandboxels-package/sandboxels-1.13.2/mods/unhide.js +10 -0
  858. package/sandboxels-package/sandboxels-1.13.2/mods/variety_mod.js +727 -0
  859. package/sandboxels-package/sandboxels-1.13.2/mods/velocity.js +139 -0
  860. package/sandboxels-package/sandboxels-1.13.2/mods/velocity2.js +209 -0
  861. package/sandboxels-package/sandboxels-1.13.2/mods/video.js +125 -0
  862. package/sandboxels-package/sandboxels-1.13.2/mods/vinegar.js +17 -0
  863. package/sandboxels-package/sandboxels-1.13.2/mods/volcanic_expansion.js +94 -0
  864. package/sandboxels-package/sandboxels-1.13.2/mods/war.js +51 -0
  865. package/sandboxels-package/sandboxels-1.13.2/mods/war_crimes.js +131 -0
  866. package/sandboxels-package/sandboxels-1.13.2/mods/waterspout.js +26 -0
  867. package/sandboxels-package/sandboxels-1.13.2/mods/weAllScreamFor.js +218 -0
  868. package/sandboxels-package/sandboxels-1.13.2/mods/weapons.js +1286 -0
  869. package/sandboxels-package/sandboxels-1.13.2/mods/wheel_fix.js +19 -0
  870. package/sandboxels-package/sandboxels-1.13.2/mods/wifi.js +162 -0
  871. package/sandboxels-package/sandboxels-1.13.2/mods/wifi_draw.js +87 -0
  872. package/sandboxels-package/sandboxels-1.13.2/mods/wine.js +8 -0
  873. package/sandboxels-package/sandboxels-1.13.2/mods/wirelike_test.js +681 -0
  874. package/sandboxels-package/sandboxels-1.13.2/mods/worldEdit.js +441 -0
  875. package/sandboxels-package/sandboxels-1.13.2/mods/worldEdit.ts +569 -0
  876. package/sandboxels-package/sandboxels-1.13.2/mods/world_gen_test.js +315 -0
  877. package/sandboxels-package/sandboxels-1.13.2/mods/worldgen_test.js +173 -0
  878. package/sandboxels-package/sandboxels-1.13.2/mods/worldgenlibrary.js +164 -0
  879. package/sandboxels-package/sandboxels-1.13.2/mods/x_dependent_change_test.js +34 -0
  880. package/sandboxels-package/sandboxels-1.13.2/mods/yumcherries.js +543 -0
  881. package/sandboxels-package/sandboxels-1.13.2/mods/zonneschijn7.js +6 -0
  882. package/sandboxels-package/sandboxels-1.13.2/mods/zoom.js +322 -0
  883. package/sandboxels-package/sandboxels-1.13.2/offline-use.html +103 -0
  884. package/sandboxels-package/sandboxels-1.13.2/offline.html +1 -0
  885. package/sandboxels-package/sandboxels-1.13.2/presskit.html +165 -0
  886. package/sandboxels-package/sandboxels-1.13.2/promo.html +13 -0
  887. package/sandboxels-package/sandboxels-1.13.2/scripts/im2elements/code.go +116 -0
  888. package/sandboxels-package/sandboxels-1.13.2/scripts/im2elements/go.mod +5 -0
  889. package/sandboxels-package/sandboxels-1.13.2/scripts/im2elements/go.sum +2 -0
  890. package/sandboxels-package/sandboxels-1.13.2/scripts/im2elements/main.go +58 -0
  891. package/sandboxels-package/sandboxels-1.13.2/scripts/perlin.js +165 -0
  892. package/sandboxels-package/sandboxels-1.13.2/service-worker.js +16 -0
  893. package/sandboxels-package/sandboxels-1.13.2/sitemap.txt +13 -0
  894. package/sandboxels-package/sandboxels-1.13.2/style.css +1105 -0
  895. package/sandboxels-package/sandboxels-1.13.2/template.html +86 -0
  896. package/sandboxels-package/sandboxels-1.13.2/tips.html +147 -0
  897. package/sandboxels-package/sandboxels-1.13.2/translate.html +105 -0
  898. package/README.md +0 -3
@@ -0,0 +1,1914 @@
1
+ // CircuitCore.js: adds circuits (logicGates.js is required)
2
+
3
+ // Other mods
4
+ ensureModEnabled("mods/betterSettings.js");
5
+ ensureModEnabled("mods/logicgates.js");
6
+ const isLightmapEnabled = enabledMods.includes("mods/lightmap.js") || enabledMods.includes("mods/fast_lightmap.js");
7
+
8
+ // Define settings
9
+ const cc_settingsTab = new SettingsTab("CircuitCore");
10
+ const cc_heat_emit_setting = new Setting("Make circuits emit heat", "heatEmit", settingType.BOOLEAN, false, true);
11
+ const cc_stable_tick_setting = new Setting("More consistent logicgates.js tick (page refresh required)", "stableTick", settingType.BOOLEAN, false, true);
12
+ cc_settingsTab.registerSettings("Realism", cc_heat_emit_setting);
13
+ cc_settingsTab.registerSettings("Tick", cc_stable_tick_setting);
14
+ settingsManager.registerTab(cc_settingsTab);
15
+
16
+ // Constants
17
+ const DIGIT_SEGMENT_PATTERNS = [
18
+ "111101101101111", // 0
19
+ "001001001001001", // 1
20
+ "111001111100111", // 2
21
+ "111001111001111", // 3
22
+ "101101111001001", // 4
23
+ "111100111001111", // 5
24
+ "111100111101111", // 6
25
+ "111001001001001", // 7
26
+ "111101111101111", // 8
27
+ "111101111001111", // 9
28
+ "111101111101101", // A
29
+ "100100111101111", // B
30
+ "111100100100111", // C
31
+ "001001111101111", // D
32
+ "111100111100111", // E
33
+ "111100111100100" // F
34
+ ];
35
+
36
+ let colorPalette_4bit = [
37
+ "#101820", "#37175F", "#5F1717", "#6F175F",
38
+ "#005F00", "#1563BF", "#7F401A", "#525252",
39
+ "#8F8F8F", "#EE8822", "#FF3027", "#FF47FF",
40
+ "#58E618", "#27FFDF", "#FFFF27", "#FFFFFF"
41
+ ];
42
+
43
+ function ensureModEnabled(modName) {
44
+ if (enabledMods.includes(modName))
45
+ return;
46
+
47
+ enabledMods.unshift(modName);
48
+ localStorage.setItem("enabledMods", JSON.stringify(enabledMods));
49
+ window.location.reload();
50
+ }
51
+
52
+ function cc_arrayToRgbString(rgbArray) {
53
+ return `rgb(${rgbArray.join(', ')})`;
54
+ }
55
+
56
+ function cc_scaleList(numbers, scale) {
57
+ return numbers.map(number => number * scale);
58
+ }
59
+
60
+ function binaryArrayToNumber(binaryArray) {
61
+ return binaryArray.reduce((number, bit) => (number << 1) | bit, 0);
62
+ }
63
+
64
+ function validateHexDigit(digit) {
65
+ if (!Number.isInteger(digit) || digit < 0 || digit >= DIGIT_SEGMENT_PATTERNS.length) {
66
+ throw new RangeError(`Hex digit must be between 0 and 15, got ${digit}`);
67
+ }
68
+ }
69
+
70
+ function parseBitTriplet(triplet) {
71
+ return triplet.split('').map(c => c === '1' ? 1 : 0);
72
+ }
73
+
74
+ function createSevenSegmentGrid(digit) {
75
+ validateHexDigit(digit);
76
+
77
+ const pattern = DIGIT_SEGMENT_PATTERNS[digit];
78
+ const grid = [];
79
+
80
+ for (let i = 0; i < 15; i += 3) {
81
+ grid.push(parseBitTriplet(pattern.slice(i, i + 3)));
82
+ }
83
+
84
+ return grid;
85
+ }
86
+
87
+ function rotateCoordinateAroundOrigin(x, y, angle) {
88
+ let radians = angle * (Math.PI / 180);
89
+ let cos = Math.cos(radians);
90
+ let sin = Math.sin(radians);
91
+
92
+ let nx = Math.round(x * cos - y * sin);
93
+ let ny = Math.round(x * sin + y * cos);
94
+
95
+ return [nx, ny];
96
+ }
97
+
98
+ // Initialize the circuit with optional rotation
99
+ function initializeCircuit(pixel, pins, w, h, center = true, rotation = circuitRotation, callback = () => {
100
+ }) {
101
+ if (pixel.hasGenerated) {
102
+ return;
103
+ }
104
+
105
+ if (!center) {
106
+ rotation = 0;
107
+ } // non-centered circuits don't support rotation yet
108
+ pixel.circuitRotation = rotation;
109
+
110
+ createCircuitFrame(pixel, w, h, center, rotation);
111
+ createPins(pixel, pins, rotation);
112
+ callback(pixel, pins, w, h);
113
+
114
+ pixel.hasGenerated = true;
115
+ }
116
+
117
+ function createCircuitFrame(pixel, width_, height_, center = true, rotation = 0) {
118
+ let halfHeight = Math.floor(height_ / 2);
119
+ let halfWidth = Math.floor(width_ / 2);
120
+
121
+ let a = -halfHeight;
122
+ let b = halfHeight;
123
+ let c = -halfWidth;
124
+ let d = halfWidth;
125
+
126
+ if (!center) {
127
+ a = 0;
128
+ b = height_ - 1;
129
+ c = 0;
130
+ d = width_ - 1;
131
+ }
132
+
133
+ for (let y = a; y <= b; y++) {
134
+ for (let x = c; x <= d; x++) {
135
+ let [rx, ry] = rotateCoordinateAroundOrigin(x, y, rotation);
136
+ let px = pixel.x + rx;
137
+ let py = pixel.y + ry;
138
+
139
+ if (!(0 <= px && px < width && 0 <= py && py < height)) {
140
+ continue;
141
+ }
142
+
143
+ // Create the pixel
144
+ if (!pixelMap[px] || pixelMap[px][py] === undefined) {
145
+ createPixel("circuit_material", px, py);
146
+ }
147
+
148
+ // Set the core position property
149
+ if (pixelMap[px] && pixelMap[px][py] && pixelMap[px][py].element === "circuit_material") {
150
+ pixelMap[px][py].corePosition = {x: pixel.x, y: pixel.y};
151
+ }
152
+ }
153
+ }
154
+ }
155
+
156
+ function createPins(pixel, pins, rotation = 0) {
157
+ for (let i = 0; i < pins.length; i++) {
158
+ let [rx, ry] = rotateCoordinateAroundOrigin(pins[i][0], pins[i][1], rotation);
159
+ let px = pixel.x + rx;
160
+ let py = pixel.y + ry;
161
+ if (!(0 <= px && px < width && 0 <= py && py < height)) {
162
+ continue;
163
+ }
164
+
165
+ if (!pixelMap[px] || pixelMap[px][py] === undefined) {
166
+ let pinType = pins[i][2] ? "input_pin" : "output_pin";
167
+ createPixel(pinType, px, py);
168
+ }
169
+ }
170
+ }
171
+
172
+ function getRotatedPinPixel(pixel, pins, index, rotation = pixel.circuitRotation) {
173
+ let [rx, ry] = rotateCoordinateAroundOrigin(pins[index][0], pins[index][1], rotation);
174
+ let px = pixel.x + rx;
175
+ let py = pixel.y + ry;
176
+ if (!(0 <= px && px < width && 0 <= py && py < height)) {
177
+ return null;
178
+ }
179
+ return pixelMap[px][py];
180
+ }
181
+
182
+ function checkPin(pixel, pins, index, rotation = pixel.circuitRotation) {
183
+ const target = getRotatedPinPixel(pixel, pins, index, rotation);
184
+ return target && target.active;
185
+ }
186
+
187
+ function setPin(pixel, pins, index, value, rotation = pixel.circuitRotation) {
188
+ const target = getRotatedPinPixel(pixel, pins, index, rotation);
189
+ if (target && target.element === "output_pin") {
190
+ target.active = value;
191
+ }
192
+ }
193
+
194
+ // Circuits
195
+ function general_reverser(inputBits) {
196
+ return function (pixel) {
197
+ let pins = [];
198
+ let outputCount = inputBits;
199
+ let circuitWidth = (inputBits * 2) + 1;
200
+ let circuitHeight = 3;
201
+
202
+ // Define input pins
203
+ for (let i = 0; i < inputBits; i++) {
204
+ pins.push([Math.floor(circuitWidth / 2) - 1 - (2 * i), -2, true]);
205
+ }
206
+
207
+ // Define output pins
208
+ for (let i = 0; i < outputCount; i++) {
209
+ pins.push([Math.floor(circuitWidth / 2) - 1 - (2 * i), 2, false]); // Right outputs
210
+ }
211
+
212
+ initializeCircuit(pixel, pins, circuitWidth, circuitHeight);
213
+
214
+ // Read input values
215
+ let input = [];
216
+ for (let i = 0; i < inputBits; i++) {
217
+ input.push(checkPin(pixel, pins, i));
218
+ }
219
+
220
+ // Set output values
221
+ for (let i = 0; i < outputCount; i++) {
222
+ setPin(pixel, pins, inputBits + i, input[input.length - 1 - i]);
223
+ }
224
+ };
225
+ }
226
+
227
+ elements.two_bit_reverser_circuit = {
228
+ cc_stableTick: general_reverser(2)
229
+ };
230
+
231
+ let lastSelectedReverserCircuitBits;
232
+ elements.reverser_circuit = {
233
+ onSelect: function () {
234
+ // Prompt user for the bit count
235
+ lastSelectedReverserCircuitBits = parseInt(prompt("How many bits wide chip?", "4"));
236
+ },
237
+ cc_stableTick: function (pixel) {
238
+ if (!pixel.bits) {
239
+ pixel.bits = lastSelectedReverserCircuitBits;
240
+ }
241
+ let circuitFunction = general_reverser(pixel.bits);
242
+ circuitFunction(pixel);
243
+ }
244
+ };
245
+
246
+ elements.four_bit_selector_circuit = {
247
+ cc_stableTick: function (pixel) {
248
+ let pins = [
249
+ // First 4-bit input (A)
250
+ [-7, -2, true], // A0
251
+ [-5, -2, true], // A1
252
+ [-3, -2, true], // A2
253
+ [-1, -2, true], // A3
254
+
255
+ // Second 4-bit input (B)
256
+ [1, -2, true], // B0
257
+ [3, -2, true], // B1
258
+ [5, -2, true], // B2
259
+ [7, -2, true], // B3
260
+
261
+ // Selection pin (Sel)
262
+ [9, 0, true], // Selection (Sel)
263
+
264
+ // Output (O)
265
+ [-3, 2, false], // O0 (centered)
266
+ [-1, 2, false], // O1 (centered)
267
+ [1, 2, false], // O2 (centered)
268
+ [3, 2, false], // O3 (centered)
269
+ ];
270
+
271
+ initializeCircuit(pixel, pins, 17, 3);
272
+
273
+ // Read inputs
274
+ let A = [
275
+ checkPin(pixel, pins, 0),
276
+ checkPin(pixel, pins, 1),
277
+ checkPin(pixel, pins, 2),
278
+ checkPin(pixel, pins, 3)
279
+ ];
280
+
281
+ let B = [
282
+ checkPin(pixel, pins, 4),
283
+ checkPin(pixel, pins, 5),
284
+ checkPin(pixel, pins, 6),
285
+ checkPin(pixel, pins, 7)
286
+ ];
287
+
288
+ let Sel = checkPin(pixel, pins, 8); // Selection pin
289
+
290
+ // Select between A and B based on Sel
291
+ let output = Sel ? B : A;
292
+
293
+ // Output the selected 4-bit value
294
+ setPin(pixel, pins, 9, output[0]); // O0
295
+ setPin(pixel, pins, 10, output[1]); // O1
296
+ setPin(pixel, pins, 11, output[2]); // O2
297
+ setPin(pixel, pins, 12, output[3]); // O3
298
+ }
299
+ };
300
+
301
+ elements.four_bit_enabler_circuit = {
302
+ centered: true,
303
+ cc_stableTick: function (pixel) {
304
+ let pins = [
305
+ // Data inputs (D0-D3)
306
+ [-3, -2, true], // D0
307
+ [-1, -2, true], // D1
308
+ [1, -2, true], // D2
309
+ [3, -2, true], // D3
310
+
311
+ // Enable input (E)
312
+ [5, 0, true], // Enable (E)
313
+
314
+ // Enable mirror (E2)
315
+ [-5, 0, false],
316
+
317
+ // Outputs (Q0-Q3)
318
+ [-3, 2, false], // Q0
319
+ [-1, 2, false], // Q1
320
+ [1, 2, false], // Q2
321
+ [3, 2, false] // Q3
322
+ ];
323
+
324
+ let elementData = elements[pixel.element];
325
+ initializeCircuit(pixel, pins, 9, 3, elementData.centered);
326
+
327
+ // Read inputs
328
+ let D = [
329
+ checkPin(pixel, pins, 0),
330
+ checkPin(pixel, pins, 1),
331
+ checkPin(pixel, pins, 2),
332
+ checkPin(pixel, pins, 3)
333
+ ];
334
+
335
+ let C = checkPin(pixel, pins, 4); // Control input
336
+ setPin(pixel, pins, 5, C);
337
+
338
+ // Previous state initialization
339
+ if (pixel._state === undefined) {
340
+ pixel._state = [false, false, false, false];
341
+ }
342
+
343
+ // Update latch state based on control input
344
+ if (C) {
345
+ pixel._state = [D[0], D[1], D[2], D[3]]; // Update latch state with data inputs
346
+ } else {
347
+ pixel._state = [false, false, false, false];
348
+ }
349
+
350
+ // Output the latch state
351
+ setPin(pixel, pins, 6, pixel._state[0]); // Q0
352
+ setPin(pixel, pins, 7, pixel._state[1]); // Q1
353
+ setPin(pixel, pins, 8, pixel._state[2]); // Q2
354
+ setPin(pixel, pins, 9, pixel._state[3]); // Q3
355
+ }
356
+ };
357
+
358
+ elements.randomizer = {
359
+ color: "#FFCCFF",
360
+ cc_stableTick: function (pixel) {
361
+ for (let i = 0; i < adjacentCoords.length; i++) {
362
+ let coord = adjacentCoords[i];
363
+ let x = pixel.x + coord[0];
364
+ let y = pixel.y + coord[1];
365
+ if (!isEmpty(x, y, true)) {
366
+ if (pixelMap[x][y].element === "logic_wire") {
367
+ if (Math.random() < 0.5) {
368
+ pixelMap[x][y].lstate = 2
369
+ pixelMap[x][y].color = pixelColorPick(pixelMap[x][y], "#ffe49c")
370
+ } else {
371
+ pixelMap[x][y].lstate = -2
372
+ pixelMap[x][y].color = pixelColorPick(pixelMap[x][y], "#3d4d2c")
373
+ }
374
+ }
375
+ }
376
+ }
377
+ },
378
+ }
379
+
380
+ elements.four_bit_randomizer_circuit = {
381
+ cc_stableTick: function (pixel) {
382
+ let pins = [
383
+ // Clock input
384
+ [0, -2, true], // Clock
385
+
386
+ // Outputs (Q0-Q3)
387
+ [-3, 2, false], // Q0
388
+ [-1, 2, false], // Q1
389
+ [1, 2, false], // Q2
390
+ [3, 2, false] // Q3
391
+ ];
392
+
393
+ initializeCircuit(pixel, pins, 9, 3);
394
+
395
+ // Read clock input
396
+ let clock = checkPin(pixel, pins, 0);
397
+
398
+ // Initialize the state if not already done
399
+ if (pixel._state === undefined) {
400
+ pixel._state = [false, false, false, false];
401
+ pixel.prevClock = false;
402
+ }
403
+
404
+ // Detect the positive edge on the clock pin
405
+ if (clock && !pixel.prevClock) {
406
+ // Generate a new 4-bit random number
407
+ let randomValue = Math.floor(Math.random() * 16);
408
+
409
+ // Update the state with the new random value
410
+ pixel._state = [
411
+ (randomValue & 1) !== 0,
412
+ (randomValue & 2) !== 0,
413
+ (randomValue & 4) !== 0,
414
+ (randomValue & 8) !== 0
415
+ ];
416
+ }
417
+
418
+ // Output the current state
419
+ setPin(pixel, pins, 1, pixel._state[0]); // Q0
420
+ setPin(pixel, pins, 2, pixel._state[1]); // Q1
421
+ setPin(pixel, pins, 3, pixel._state[2]); // Q2
422
+ setPin(pixel, pins, 4, pixel._state[3]); // Q3
423
+
424
+ // Update previous state of clock input
425
+ pixel.prevClock = clock;
426
+ }
427
+ };
428
+
429
+ function general_encoder(inputBits) {
430
+ return function (pixel) {
431
+ let pins = [];
432
+ let outputBits = Math.ceil(Math.log2(inputBits));
433
+ let circuitWidth = (inputBits * 2) + 1;
434
+ let circuitHeight = (outputBits * 2) + 1;
435
+
436
+ // Define input pins
437
+ for (let i = 0; i < inputBits; i++) {
438
+ pins.push([Math.floor(circuitWidth / 2) - 1 - (2 * i), outputBits + 1, true]);
439
+ }
440
+
441
+ // Define output pins
442
+ for (let i = 0; i < outputBits; i++) {
443
+ pins.push([Math.floor(circuitWidth / 2) + 1, outputBits - 1 - (2 * i), false]); // Right outputs
444
+ }
445
+
446
+ // Mirrored outputs
447
+ for (let i = 0; i < outputBits; i++) {
448
+ pins.push([-Math.floor(circuitWidth / 2) - 1, outputBits - 1 - (2 * i), false]); // Left outputs
449
+ }
450
+
451
+ initializeCircuit(pixel, pins, circuitWidth, circuitHeight);
452
+
453
+ // Determine which input is active (priority encoder)
454
+ let activeInput = -1;
455
+ for (let i = inputBits - 1; i >= 0; i--) {
456
+ if (checkPin(pixel, pins, i)) {
457
+ activeInput = i;
458
+ break;
459
+ }
460
+ }
461
+
462
+ // Set output values based on active input
463
+ for (let i = 0; i < outputBits; i++) {
464
+ let outputValue = activeInput >= 0 ? ((activeInput >> i) & 1) : false;
465
+ setPin(pixel, pins, inputBits + i, outputValue); // Right outputs
466
+ setPin(pixel, pins, inputBits + outputBits + i, outputValue); // Left outputs
467
+ }
468
+ };
469
+ }
470
+
471
+ // Define a 2-to-1 encoder using the general_encoder function
472
+ elements.two_to_one_encoder_circuit = {
473
+ cc_stableTick: general_encoder(2)
474
+ };
475
+
476
+ // Define a 4-to-2 encoder using the general_encoder function
477
+ elements.four_to_two_encoder_circuit = {
478
+ cc_stableTick: general_encoder(4)
479
+ };
480
+
481
+ // Define an 8-to-3 encoder using the general_encoder function
482
+ elements.eight_to_three_encoder_circuit = {
483
+ cc_stableTick: general_encoder(8)
484
+ };
485
+
486
+ // Define a 16-to-4 encoder using the general_encoder function
487
+ elements.sixteen_to_four_encoder_circuit = {
488
+ cc_stableTick: general_encoder(16)
489
+ };
490
+
491
+ function general_demultiplexer(selectorBits) {
492
+ return function (pixel) {
493
+ let pins = [];
494
+ let outputCount = Math.pow(2, selectorBits);
495
+ let circuitWidth = 3;
496
+ let circuitHeight = (outputCount * 2) + 1;
497
+
498
+ // Define the input pin
499
+ pins.push([0, Math.floor(circuitHeight / 2) + 1, true]);
500
+
501
+ // Define selector pins
502
+ for (let i = 0; i < selectorBits; i++) {
503
+ pins.push([-2, (Math.floor(circuitHeight / 2) - 1) - (2 * i), true]);
504
+ }
505
+
506
+ // Define output pins
507
+ for (let i = 0; i < outputCount; i++) {
508
+ pins.push([Math.floor(circuitWidth / 2) + 1, Math.floor(circuitHeight / 2) - 1 - (2 * i), false]);
509
+ }
510
+
511
+ initializeCircuit(pixel, pins, circuitWidth, circuitHeight);
512
+
513
+ // Read input and selector values
514
+ let input = checkPin(pixel, pins, 0);
515
+ let selector = 0;
516
+ for (let i = 0; i < selectorBits; i++) {
517
+ if (checkPin(pixel, pins, 1 + i)) {
518
+ selector += Math.pow(2, i);
519
+ }
520
+ }
521
+
522
+ // Set output values based on selector
523
+ for (let i = 0; i < outputCount; i++) {
524
+ setPin(pixel, pins, 1 + selectorBits + i, i === selector ? input : false);
525
+ }
526
+ };
527
+ }
528
+
529
+ // Define a 1-to-2 demultiplexer using the general_demultiplexer function
530
+ elements.one_to_two_demultiplexer_circuit = {
531
+ cc_stableTick: general_demultiplexer(1)
532
+ };
533
+
534
+ // Define a 1-to-4 demultiplexer using the general_demultiplexer function
535
+ elements.one_to_four_demultiplexer_circuit = {
536
+ cc_stableTick: general_demultiplexer(2)
537
+ };
538
+
539
+ // Define a 1-to-8 demultiplexer using the general_demultiplexer function
540
+ elements.one_to_eight_demultiplexer_circuit = {
541
+ cc_stableTick: general_demultiplexer(3)
542
+ };
543
+
544
+ // Define a 1-to-16 demultiplexer using the general_demultiplexer function
545
+ elements.one_to_sixteen_demultiplexer_circuit = {
546
+ cc_stableTick: general_demultiplexer(4)
547
+ };
548
+
549
+ function general_decoder(inputBits) {
550
+ return function (pixel) {
551
+ let pins = [];
552
+ let outputCount = Math.pow(2, inputBits);
553
+ let circuitWidth = (inputBits * 2) + 1;
554
+ let circuitHeight = (outputCount * 2) + 1;
555
+
556
+ // Define input pins
557
+ for (let i = 0; i < inputBits; i++) {
558
+ pins.push([Math.floor(circuitWidth / 2) - 1 - (2 * i), outputCount + 1, true]);
559
+ }
560
+
561
+ // Define output pins
562
+ for (let i = 0; i < outputCount; i++) {
563
+ pins.push([Math.floor(circuitWidth / 2) + 1, outputCount - 1 - (2 * i), false]); // Right outputs
564
+ }
565
+
566
+ for (let i = 0; i < outputCount; i++) {
567
+ pins.push([-Math.floor(circuitWidth / 2) - 1, outputCount - 1 - (2 * i), false]); // Left outputs
568
+ }
569
+
570
+ initializeCircuit(pixel, pins, circuitWidth, circuitHeight);
571
+
572
+ // Read input values
573
+ let input = 0;
574
+ for (let i = 0; i < inputBits; i++) {
575
+ if (checkPin(pixel, pins, i)) {
576
+ input += Math.pow(2, i);
577
+ }
578
+ }
579
+
580
+ // Set output values
581
+ for (let i = 0; i < outputCount; i++) {
582
+ let outputValue = (i === input);
583
+ setPin(pixel, pins, inputBits + i, outputValue); // Right outputs
584
+ setPin(pixel, pins, inputBits + outputCount + i, outputValue); // Left outputs
585
+ }
586
+ };
587
+ }
588
+
589
+ elements.one_to_two_decoder_circuit = {
590
+ cc_stableTick: general_decoder(1)
591
+ };
592
+
593
+ elements.two_to_four_decoder_circuit = {
594
+ cc_stableTick: general_decoder(2)
595
+ };
596
+
597
+ elements.three_to_eight_decoder_circuit = {
598
+ cc_stableTick: general_decoder(3)
599
+ };
600
+
601
+ elements.four_to_sixteen_decoder_circuit = {
602
+ cc_stableTick: general_decoder(4)
603
+ };
604
+
605
+ function general_multiplexer(inputLines) {
606
+ return function (pixel) {
607
+ let pins = [];
608
+ let selectorBits = Math.ceil(Math.log2(inputLines));
609
+ let circuitWidth = (selectorBits * 2) + 1;
610
+ let circuitHeight = (inputLines * 2) + 1;
611
+
612
+ // Define selector pins
613
+ for (let i = 0; i < selectorBits; i++) {
614
+ pins.push([Math.floor(circuitWidth / 2) - 1 - (2 * i), inputLines + 1, true]);
615
+ }
616
+
617
+ // Define input data pins
618
+ for (let i = 0; i < inputLines; i++) {
619
+ pins.push([-Math.floor(circuitWidth / 2) - 1, inputLines - 1 - (2 * i), true]);
620
+ }
621
+
622
+ // Define output pin
623
+ pins.push([Math.floor(circuitWidth / 2) + 1, 0, false]);
624
+
625
+ initializeCircuit(pixel, pins, circuitWidth, circuitHeight);
626
+
627
+ // Read selector input
628
+ let selector = 0;
629
+ for (let i = 0; i < selectorBits; i++) {
630
+ if (checkPin(pixel, pins, i)) {
631
+ selector += Math.pow(2, i);
632
+ }
633
+ }
634
+
635
+ setPin(pixel, pins, selectorBits + inputLines, checkPin(pixel, pins, selector + selectorBits)); // Output pin
636
+ };
637
+ }
638
+
639
+ // Define a 2-input multiplexer using the general_multiplexer function
640
+ elements.two_to_one_multiplexer_circuit = {
641
+ cc_stableTick: general_multiplexer(2)
642
+ };
643
+
644
+ // Define a 4-input multiplexer using the general_multiplexer function
645
+ elements.four_to_one_multiplexer_circuit = {
646
+ cc_stableTick: general_multiplexer(4)
647
+ };
648
+
649
+ // Define an 8-input multiplexer using the general_multiplexer function
650
+ elements.eight_to_one_multiplexer_circuit = {
651
+ cc_stableTick: general_multiplexer(8)
652
+ };
653
+
654
+ // Define an 8-input multiplexer using the general_multiplexer function
655
+ elements.sixteen_to_one_multiplexer_circuit = {
656
+ cc_stableTick: general_multiplexer(16)
657
+ };
658
+
659
+ elements.four_bit_PISO_shift_register_circuit = {
660
+ cc_stableTick: function (pixel) {
661
+ let pins = [
662
+ // Data inputs (D0-D3)
663
+ [3, -3, true], // D3
664
+ [1, -3, true], // D2
665
+ [-1, -3, true], // D1
666
+ [-3, -3, true], // D0
667
+
668
+ // Control input (Load/Shift Enable)
669
+ [-5, -1, true], // Load/Shift Enable
670
+
671
+ // Clock input
672
+ [-5, 1, true], // Clock
673
+
674
+ // Serial output
675
+ [5, -1, false], // Serial Out (Q)
676
+ [5, 1, false] // Transmission Flag
677
+ ];
678
+
679
+ initializeCircuit(pixel, pins, 9, 5);
680
+
681
+ // Read data inputs
682
+ let D = [
683
+ checkPin(pixel, pins, 0),
684
+ checkPin(pixel, pins, 1),
685
+ checkPin(pixel, pins, 2),
686
+ checkPin(pixel, pins, 3)
687
+ ];
688
+
689
+ // Read control and clock inputs
690
+ let loadShiftEnable = checkPin(pixel, pins, 4);
691
+ let clock = checkPin(pixel, pins, 5);
692
+
693
+ // Initialize the state if not already done
694
+ if (pixel._state === undefined) {
695
+ pixel._state = [false, false, false, false];
696
+ pixel.bitIndex = 0;
697
+ pixel.prevLoadShiftEnable = false;
698
+ pixel.prevClock = false;
699
+ }
700
+
701
+ // Detect the positive edge on the control pin
702
+ if (loadShiftEnable && !pixel.prevLoadShiftEnable) {
703
+ // Load the data into the register on the first positive edge
704
+ pixel._state = [D[0], D[1], D[2], D[3]];
705
+ pixel.bitIndex = 0;
706
+ }
707
+
708
+ // Detect the positive edge on the clock pin
709
+ if (clock && !pixel.prevClock) {
710
+ if (pixel.bitIndex < 4) {
711
+ // Shift the register and output the next bit
712
+ let serialOut = pixel._state[0];
713
+ for (let i = 0; i < 3; i++) {
714
+ pixel._state[i] = pixel._state[i + 1];
715
+ }
716
+ pixel._state[3] = false; // Clear the last bit after shifting
717
+
718
+ // Output the serial value
719
+ setPin(pixel, pins, 6, serialOut);
720
+
721
+ // Update bit index
722
+ pixel.bitIndex++;
723
+ }
724
+ }
725
+
726
+ // Set the transmission flag
727
+ let transmitting = pixel.bitIndex < 4 && loadShiftEnable;
728
+ setPin(pixel, pins, 7, transmitting);
729
+
730
+ // Update previous state of control and clock inputs
731
+ pixel.prevLoadShiftEnable = loadShiftEnable;
732
+ pixel.prevClock = clock;
733
+ }
734
+ };
735
+
736
+ elements.four_bit_SIPO_shift_register_circuit = {
737
+ cc_stableTick: function (pixel) {
738
+ let pins = [
739
+ // Serial input (Data In)
740
+ [-2, -3, true], // Data In
741
+
742
+ // Clock input
743
+ [-2, -1, true], // Clock
744
+
745
+ // Parallel outputs (Q0-Q3)
746
+ [2, 3, false], // Q3
747
+ [2, 1, false], // Q2
748
+ [2, -1, false], // Q1
749
+ [2, -3, false] // Q0
750
+ ];
751
+
752
+ initializeCircuit(pixel, pins, 3, 9);
753
+
754
+ // Read serial and clock input
755
+ let serialIn = checkPin(pixel, pins, 0);
756
+ let clock = checkPin(pixel, pins, 1);
757
+
758
+ // Initialize the state if not already done
759
+ if (pixel._state === undefined) {
760
+ pixel._state = [false, false, false, false];
761
+ pixel.prevClock = false;
762
+ }
763
+
764
+ // Detect the positive edge on the clock pin
765
+ if (clock && !pixel.prevClock) {
766
+ pixel._state = [serialIn, pixel._state[0], pixel._state[1], pixel._state[2]];
767
+ }
768
+
769
+ // Output the parallel values
770
+ for (let i = 0; i < 4; i++) {
771
+ setPin(pixel, pins, 2 + i, pixel._state[i]);
772
+ }
773
+
774
+ // Update previous state of control and clock inputs
775
+ pixel.prevClock = clock;
776
+ }
777
+ };
778
+
779
+ elements.four_bit_program_counter_circuit = {
780
+ cc_stableTick: function (pixel) {
781
+ let pins = [
782
+ // Data inputs (D0-D3)
783
+ [-3, -3, true], // D0
784
+ [-1, -3, true], // D1
785
+ [1, -3, true], // D2
786
+ [3, -3, true], // D3
787
+
788
+ // Control inputs (Increment, Write Enable)
789
+ [5, -1, true], // Increment
790
+ [5, 1, true], // Write Enable
791
+
792
+ // Outputs (Q0-Q3)
793
+ [-3, 3, false], // Q0
794
+ [-1, 3, false], // Q1
795
+ [1, 3, false], // Q2
796
+ [3, 3, false], // Q3
797
+ ];
798
+
799
+ initializeCircuit(pixel, pins, 9, 5);
800
+
801
+ // Read data inputs
802
+ let D = [
803
+ checkPin(pixel, pins, 0),
804
+ checkPin(pixel, pins, 1),
805
+ checkPin(pixel, pins, 2),
806
+ checkPin(pixel, pins, 3)
807
+ ];
808
+
809
+ // Read control inputs
810
+ let Increment = checkPin(pixel, pins, 4);
811
+ let WriteEnable = checkPin(pixel, pins, 5);
812
+
813
+ // Initialize the state if not already done
814
+ if (pixel._state === undefined) {
815
+ pixel._state = [false, false, false, false];
816
+ pixel.prevIncrement = false; // Previous state of Increment pin
817
+ }
818
+
819
+ // Convert the state to a 4-bit binary number
820
+ let stateValue = binaryArrayToNumber(pixel._state);
821
+
822
+ // Detect the positive edge on the Increment pin
823
+ if (Increment && !pixel.prevIncrement) {
824
+ stateValue = (stateValue + 1) % 16; // Ensure the value wraps around at 4 bits
825
+ }
826
+
827
+ // Update the register state if WriteEnable is active
828
+ if (WriteEnable) {
829
+ stateValue = binaryArrayToNumber(D); // Load data inputs into state
830
+ }
831
+
832
+ // Update the state
833
+ pixel._state = [
834
+ (stateValue & 8) !== 0,
835
+ (stateValue & 4) !== 0,
836
+ (stateValue & 2) !== 0,
837
+ (stateValue & 1) !== 0
838
+ ];
839
+
840
+ // Output the register state
841
+ setPin(pixel, pins, 6, pixel._state[0]); // Q0
842
+ setPin(pixel, pins, 7, pixel._state[1]); // Q1
843
+ setPin(pixel, pins, 8, pixel._state[2]); // Q2
844
+ setPin(pixel, pins, 9, pixel._state[3]); // Q3
845
+
846
+ // Update previous state of Increment pin
847
+ pixel.prevIncrement = Increment;
848
+ }
849
+ };
850
+
851
+ elements.four_bit_register_circuit = {
852
+ cc_stableTick: function (pixel) {
853
+ let pins = [
854
+ // Data inputs (D0-D3)
855
+ [-3, -3, true], // D0
856
+ [-1, -3, true], // D1
857
+ [1, -3, true], // D2
858
+ [3, -3, true], // D3
859
+
860
+ // Control inputs (Enable, Write Enable)
861
+ [5, -1, true], // Enable
862
+ [5, 1, true], // Write Enable
863
+
864
+ // Outputs (Q0-Q3)
865
+ [-3, 3, false], // Q0
866
+ [-1, 3, false], // Q1
867
+ [1, 3, false], // Q2
868
+ [3, 3, false], // Q3
869
+ ];
870
+
871
+ initializeCircuit(pixel, pins, 9, 5);
872
+
873
+ // Read data inputs
874
+ let D = [
875
+ checkPin(pixel, pins, 0),
876
+ checkPin(pixel, pins, 1),
877
+ checkPin(pixel, pins, 2),
878
+ checkPin(pixel, pins, 3)
879
+ ];
880
+
881
+ // Read control inputs
882
+ let Enable = checkPin(pixel, pins, 4);
883
+ let WriteEnable = checkPin(pixel, pins, 5);
884
+
885
+ // Initialize the state if not already done
886
+ if (pixel._state === undefined) {
887
+ pixel._state = [false, false, false, false];
888
+ }
889
+
890
+ // Update the register state if WriteEnable is active
891
+ if (WriteEnable && Enable) {
892
+ pixel._state = [D[0], D[1], D[2], D[3]];
893
+ }
894
+
895
+ // Output the register state if Enable is active
896
+ if (Enable) {
897
+ setPin(pixel, pins, 6, pixel._state[0]); // Q0
898
+ setPin(pixel, pins, 7, pixel._state[1]); // Q1
899
+ setPin(pixel, pins, 8, pixel._state[2]); // Q2
900
+ setPin(pixel, pins, 9, pixel._state[3]); // Q3
901
+ } else {
902
+ // Disable outputs if Enable is not active
903
+ setPin(pixel, pins, 6, false); // Q0
904
+ setPin(pixel, pins, 7, false); // Q1
905
+ setPin(pixel, pins, 8, false); // Q2
906
+ setPin(pixel, pins, 9, false); // Q3
907
+ }
908
+ }
909
+ };
910
+
911
+ elements.SR_latch_circuit = {
912
+ cc_stableTick: function (pixel) {
913
+ let pins = [
914
+ [0, -2, true], // Input: Set
915
+ [0, 2, true], // Input: Reset
916
+ [2, 0, false], // Output
917
+ [-2, 0, false] // Output
918
+ ];
919
+ initializeCircuit(pixel, pins, 3, 3);
920
+
921
+ if (checkPin(pixel, pins, 0)) {
922
+ pixel._state = true;
923
+ } // Set
924
+ if (checkPin(pixel, pins, 1)) {
925
+ pixel._state = false;
926
+ } // Reset
927
+
928
+ setPin(pixel, pins, 2, pixel._state);
929
+ setPin(pixel, pins, 3, pixel._state);
930
+ }
931
+ };
932
+
933
+ elements.T_flip_flop_circuit = {
934
+ cc_stableTick: function (pixel) {
935
+ let pins = [
936
+ [0, -2, true], // Input: Toggle (T)
937
+ [2, 0, false], // Output (Q)
938
+ [-2, 0, false] // Output (not Q) - Optional
939
+ ];
940
+
941
+ initializeCircuit(pixel, pins, 3, 3);
942
+
943
+ // Check the current state of the Toggle (T) input
944
+ let T = checkPin(pixel, pins, 0);
945
+
946
+ // Initialize the previous state of T if not already done
947
+ if (pixel.prevT === undefined) {
948
+ pixel.prevT = false;
949
+ }
950
+
951
+ // Detect the positive edge
952
+ if (T && !pixel.prevT) {
953
+ pixel._state = !pixel._state; // Toggle state on positive edge
954
+ }
955
+
956
+ // Update the previous state of T
957
+ pixel.prevT = T;
958
+
959
+ setPin(pixel, pins, 1, pixel._state);
960
+ setPin(pixel, pins, 2, pixel._state);
961
+ }
962
+ };
963
+
964
+ elements.D_latch_circuit = {
965
+ cc_stableTick: function (pixel) {
966
+ let pins = [
967
+ [0, -2, true], // Input: Data
968
+ [2, 0, true], // Input: Enable
969
+ [0, 2, false], // Output
970
+ [-2, 0, false] // Output
971
+ ];
972
+ initializeCircuit(pixel, pins, 3, 3);
973
+
974
+ let D = checkPin(pixel, pins, 0); // Data input
975
+ let E = checkPin(pixel, pins, 1); // Enable input
976
+
977
+ if (E) {
978
+ pixel._state = D; // Q follows D when E is active
979
+ }
980
+
981
+ setPin(pixel, pins, 2, pixel._state);
982
+ setPin(pixel, pins, 3, pixel._state);
983
+ }
984
+ };
985
+
986
+ elements.D_flip_flop_circuit = {
987
+ cc_stableTick: function (pixel) {
988
+ let pins = [
989
+ [0, -2, true], // Input: Data
990
+ [2, 0, true], // Input: Enable
991
+ [0, 2, false], // Output
992
+ [-2, 0, false] // Output
993
+ ];
994
+
995
+ initializeCircuit(pixel, pins, 3, 3);
996
+
997
+ // Read inputs
998
+ let D = checkPin(pixel, pins, 0); // Data input
999
+ let C = checkPin(pixel, pins, 1); // Control input
1000
+
1001
+ // Initialize previous state of control input if not already done
1002
+ if (pixel.prevC === undefined) {
1003
+ pixel.prevC = false;
1004
+ }
1005
+
1006
+ // Previous state initialization
1007
+ if (pixel._state === undefined) {
1008
+ pixel._state = false;
1009
+ }
1010
+
1011
+ // Update flip-flop state on positive edge of control input
1012
+ if (C && !pixel.prevC) {
1013
+ pixel._state = D; // Q follows D on positive edge of C
1014
+ }
1015
+
1016
+ // Update the previous state of control input
1017
+ pixel.prevC = C;
1018
+
1019
+ // Output the flip-flop state
1020
+ setPin(pixel, pins, 2, pixel._state);
1021
+ setPin(pixel, pins, 3, pixel._state);
1022
+ }
1023
+ };
1024
+
1025
+ elements.four_bit_D_latch_circuit = {
1026
+ cc_stableTick: function (pixel) {
1027
+ let pins = [
1028
+ // Data inputs (D0-D3)
1029
+ [-3, -2, true], // D0
1030
+ [-1, -2, true], // D1
1031
+ [1, -2, true], // D2
1032
+ [3, -2, true], // D3
1033
+
1034
+ // Control input (C)
1035
+ [5, 0, true], // Control (C)
1036
+
1037
+ // Outputs (Q0-Q3)
1038
+ [-3, 2, false], // Q0
1039
+ [-1, 2, false], // Q1
1040
+ [1, 2, false], // Q2
1041
+ [3, 2, false] // Q3
1042
+ ];
1043
+
1044
+ initializeCircuit(pixel, pins, 9, 3);
1045
+
1046
+ // Read inputs
1047
+ let D = [
1048
+ checkPin(pixel, pins, 0),
1049
+ checkPin(pixel, pins, 1),
1050
+ checkPin(pixel, pins, 2),
1051
+ checkPin(pixel, pins, 3)
1052
+ ];
1053
+
1054
+ let C = checkPin(pixel, pins, 4); // Control input
1055
+
1056
+ // Previous state initialization
1057
+ if (pixel._state === undefined) {
1058
+ pixel._state = [false, false, false, false];
1059
+ }
1060
+
1061
+ // Update latch state based on control input
1062
+ if (C) {
1063
+ pixel._state = [D[0], D[1], D[2], D[3]]; // Update latch state with data inputs
1064
+ }
1065
+
1066
+ // Output the latch state
1067
+ setPin(pixel, pins, 5, pixel._state[0]); // Q0
1068
+ setPin(pixel, pins, 6, pixel._state[1]); // Q1
1069
+ setPin(pixel, pins, 7, pixel._state[2]); // Q2
1070
+ setPin(pixel, pins, 8, pixel._state[3]); // Q3
1071
+ }
1072
+ };
1073
+
1074
+ elements.four_bit_D_flip_flop_circuit = {
1075
+ cc_stableTick: function (pixel) {
1076
+ let pins = [
1077
+ // Data inputs (D0-D3)
1078
+ [-3, -2, true], // D0
1079
+ [-1, -2, true], // D1
1080
+ [1, -2, true], // D2
1081
+ [3, -2, true], // D3
1082
+
1083
+ // Control input (C)
1084
+ [5, 0, true], // Control (C)
1085
+
1086
+ // Outputs (Q0-Q3)
1087
+ [-3, 2, false], // Q0
1088
+ [-1, 2, false], // Q1
1089
+ [1, 2, false], // Q2
1090
+ [3, 2, false] // Q3
1091
+ ];
1092
+
1093
+ initializeCircuit(pixel, pins, 9, 3);
1094
+
1095
+ // Read inputs
1096
+ let D = [
1097
+ checkPin(pixel, pins, 0),
1098
+ checkPin(pixel, pins, 1),
1099
+ checkPin(pixel, pins, 2),
1100
+ checkPin(pixel, pins, 3)
1101
+ ];
1102
+
1103
+ let C = checkPin(pixel, pins, 4); // Control input
1104
+
1105
+ // Initialize previous state of control input if not already done
1106
+ if (pixel.prevC === undefined) {
1107
+ pixel.prevC = false;
1108
+ }
1109
+
1110
+ // Previous state initialization
1111
+ if (pixel._state === undefined) {
1112
+ pixel._state = [false, false, false, false];
1113
+ }
1114
+
1115
+ // Update flip-flop state on positive edge of control input
1116
+ if (C && !pixel.prevC) {
1117
+ pixel._state = [D[0], D[1], D[2], D[3]]; // Update flip-flop state with data inputs
1118
+ }
1119
+
1120
+ // Update the previous state of control input
1121
+ pixel.prevC = C;
1122
+
1123
+ // Output the flip-flop state
1124
+ setPin(pixel, pins, 5, pixel._state[0]); // Q0
1125
+ setPin(pixel, pins, 6, pixel._state[1]); // Q1
1126
+ setPin(pixel, pins, 7, pixel._state[2]); // Q2
1127
+ setPin(pixel, pins, 8, pixel._state[3]); // Q3
1128
+ }
1129
+ };
1130
+
1131
+ elements.four_bit_incrementer_circuit = {
1132
+ cc_stableTick: function (pixel) {
1133
+ let pins = [
1134
+ // 4-bit number inputs (N0-N3)
1135
+ [3, -2, true], // N3
1136
+ [1, -2, true], // N2
1137
+ [-1, -2, true], // N1
1138
+ [-3, -2, true], // N0
1139
+
1140
+ // Increment control input (INC)
1141
+ [-5, 0, true], // Increment (INC)
1142
+
1143
+ // Outputs (Q0-Q3)
1144
+ [3, 2, false], // Q3
1145
+ [1, 2, false], // Q2
1146
+ [-1, 2, false], // Q1
1147
+ [-3, 2, false], // Q0
1148
+
1149
+ // Carry out
1150
+ [5, 0, false] // Carry out (COUT)
1151
+ ];
1152
+
1153
+ initializeCircuit(pixel, pins, 9, 3);
1154
+
1155
+ // Read inputs
1156
+ let N = [
1157
+ checkPin(pixel, pins, 0),
1158
+ checkPin(pixel, pins, 1),
1159
+ checkPin(pixel, pins, 2),
1160
+ checkPin(pixel, pins, 3)
1161
+ ];
1162
+
1163
+ let INC = checkPin(pixel, pins, 4); // Increment control input
1164
+
1165
+ // Calculate the incremented value when control is active
1166
+ let carry = 0;
1167
+ let result = [];
1168
+
1169
+ if (INC) {
1170
+ carry = 1; // Start with a carry of 1 to increment by 1
1171
+ }
1172
+
1173
+ for (let i = 0; i < 4; i++) {
1174
+ let sum = N[i] + carry;
1175
+ result[i] = sum % 2; // Current bit sum
1176
+ carry = Math.floor(sum / 2); // Carry for next bit
1177
+ }
1178
+
1179
+ // Output the incremented value and carry out
1180
+ setPin(pixel, pins, 5, result[0]); // Q0
1181
+ setPin(pixel, pins, 6, result[1]); // Q1
1182
+ setPin(pixel, pins, 7, result[2]); // Q2
1183
+ setPin(pixel, pins, 8, result[3]); // Q3
1184
+ setPin(pixel, pins, 9, carry); // Carry out (COUT)
1185
+ }
1186
+ };
1187
+
1188
+ elements.four_bit_adder_circuit = {
1189
+ cc_stableTick: function (pixel) {
1190
+ let pins = [
1191
+ // First 4-bit number (A)
1192
+ [-1, -2, true], // A3
1193
+ [-3, -2, true], // A2
1194
+ [-5, -2, true], // A1
1195
+ [-7, -2, true], // A0
1196
+
1197
+ // Second 4-bit number (B)
1198
+ [7, -2, true], // B3
1199
+ [5, -2, true], // B2
1200
+ [3, -2, true], // B1
1201
+ [1, -2, true], // B0
1202
+
1203
+ // Carry-in (C_in)
1204
+ [9, 0, true], // Carry-in (C_in)
1205
+
1206
+ // Output sum (S)
1207
+ [-1, 2, false], // S3
1208
+ [-3, 2, false], // S2
1209
+ [-5, 2, false], // S1
1210
+ [-7, 2, false], // S0
1211
+ [1, 2, false], // Carry Out (C4)
1212
+ ];
1213
+
1214
+ initializeCircuit(pixel, pins, 17, 3);
1215
+
1216
+ // Read inputs
1217
+ let A = [
1218
+ checkPin(pixel, pins, 0),
1219
+ checkPin(pixel, pins, 1),
1220
+ checkPin(pixel, pins, 2),
1221
+ checkPin(pixel, pins, 3)
1222
+ ];
1223
+
1224
+ let B = [
1225
+ checkPin(pixel, pins, 4),
1226
+ checkPin(pixel, pins, 5),
1227
+ checkPin(pixel, pins, 6),
1228
+ checkPin(pixel, pins, 7)
1229
+ ];
1230
+
1231
+ let C_in = checkPin(pixel, pins, 8); // Carry-in
1232
+
1233
+ // Calculate the sum and carry
1234
+ let sum = [];
1235
+ let carry = C_in;
1236
+
1237
+ for (let i = 0; i < 4; i++) {
1238
+ let bitSum = A[i] + B[i] + carry;
1239
+ sum[i] = bitSum % 2; // Current bit sum
1240
+ carry = Math.floor(bitSum / 2); // Carry for next bit
1241
+ }
1242
+
1243
+ // Output the sum
1244
+ setPin(pixel, pins, 9, sum[0]); // S0
1245
+ setPin(pixel, pins, 10, sum[1]); // S1
1246
+ setPin(pixel, pins, 11, sum[2]); // S2
1247
+ setPin(pixel, pins, 12, sum[3]); // S3
1248
+ setPin(pixel, pins, 13, carry); // Carry Out (C4)
1249
+ }
1250
+ };
1251
+
1252
+ elements.four_bit_subtractor_circuit = {
1253
+ cc_stableTick: function (pixel) {
1254
+ let pins = [
1255
+ // First 4-bit number (A)
1256
+ [-1, -2, true], // A3
1257
+ [-3, -2, true], // A2
1258
+ [-5, -2, true], // A1
1259
+ [-7, -2, true], // A0
1260
+
1261
+ // Second 4-bit number (B)
1262
+ [7, -2, true], // B3
1263
+ [5, -2, true], // B2
1264
+ [3, -2, true], // B1
1265
+ [1, -2, true], // B0
1266
+
1267
+ // Borrow-in (B_in)
1268
+ [9, 0, true], // Borrow-in (B_in)
1269
+
1270
+ // Output difference (D)
1271
+ [-1, 2, false], // D3
1272
+ [-3, 2, false], // D2
1273
+ [-5, 2, false], // D1
1274
+ [-7, 2, false], // D0
1275
+ [1, 2, false], // Borrow Out (B4)
1276
+ ];
1277
+
1278
+ initializeCircuit(pixel, pins, 17, 3);
1279
+
1280
+ // Read inputs
1281
+ let A = [
1282
+ checkPin(pixel, pins, 0),
1283
+ checkPin(pixel, pins, 1),
1284
+ checkPin(pixel, pins, 2),
1285
+ checkPin(pixel, pins, 3)
1286
+ ];
1287
+
1288
+ let B = [
1289
+ checkPin(pixel, pins, 4),
1290
+ checkPin(pixel, pins, 5),
1291
+ checkPin(pixel, pins, 6),
1292
+ checkPin(pixel, pins, 7)
1293
+ ];
1294
+
1295
+ let B_in = checkPin(pixel, pins, 8); // Borrow-in
1296
+
1297
+ // Calculate the difference and borrow
1298
+ let difference = [];
1299
+ let borrow = B_in;
1300
+
1301
+ for (let i = 0; i < 4; i++) {
1302
+ let bitDifference = A[i] - B[i] - borrow;
1303
+ difference[i] = (bitDifference + 2) % 2; // Current bit difference
1304
+ borrow = bitDifference < 0 ? 1 : 0; // Borrow for next bit
1305
+ }
1306
+
1307
+ // Output the difference
1308
+ setPin(pixel, pins, 9, difference[0]); // D0
1309
+ setPin(pixel, pins, 10, difference[1]); // D1
1310
+ setPin(pixel, pins, 11, difference[2]); // D2
1311
+ setPin(pixel, pins, 12, difference[3]); // D3
1312
+ setPin(pixel, pins, 13, borrow); // Borrow Out (B4)
1313
+ }
1314
+ };
1315
+
1316
+ function general_clock(speed, s2) {
1317
+ return function (pixel) {
1318
+ for (let i = 0; i < adjacentCoords.length; i++) {
1319
+ let coord = adjacentCoords[i];
1320
+ let x = pixel.x + coord[0];
1321
+ let y = pixel.y + coord[1];
1322
+ if (!isEmpty(x, y, true)) {
1323
+ if (pixelMap[x][y].element === "logic_wire") {
1324
+ if (pixelTicks % speed < s2) {
1325
+ pixelMap[x][y].lstate = 2
1326
+ pixelMap[x][y].color = pixelColorPick(pixelMap[x][y], "#ffe49c")
1327
+ } else {
1328
+ pixelMap[x][y].lstate = -2
1329
+ pixelMap[x][y].color = pixelColorPick(pixelMap[x][y], "#3d4d2c")
1330
+ }
1331
+ }
1332
+ }
1333
+ }
1334
+ };
1335
+ }
1336
+
1337
+ elements.slow_clock = {
1338
+ color: "#BB66BB",
1339
+ cc_stableTick: general_clock(64, 32),
1340
+ }
1341
+
1342
+ elements.medium_clock = {
1343
+ color: "#DD88DD",
1344
+ cc_stableTick: general_clock(32, 16),
1345
+ }
1346
+
1347
+ elements.fast_clock = {
1348
+ color: "#FFAAFF",
1349
+ cc_stableTick: general_clock(16, 8),
1350
+ }
1351
+
1352
+ elements.very_fast_clock = {
1353
+ color: "#FFCCFF",
1354
+ cc_stableTick: general_clock(8, 4),
1355
+ }
1356
+
1357
+ elements.custom_RGB_led = {
1358
+ cc_stableTick: function (pixel) {
1359
+ let pins = [
1360
+ // RGB values
1361
+ [-2, -1, true], // R0
1362
+ [-2, 1, true], // R1
1363
+ [1, -2, true], // G0
1364
+ [-1, -2, true], // G1
1365
+ [2, -1, true], // B0
1366
+ [2, 1, true], // B1
1367
+ ];
1368
+
1369
+ initializeCircuit(pixel, pins, 3, 3);
1370
+
1371
+ // Read inputs
1372
+ let l = [
1373
+ checkPin(pixel, pins, 0),
1374
+ checkPin(pixel, pins, 1),
1375
+ checkPin(pixel, pins, 2),
1376
+ checkPin(pixel, pins, 3),
1377
+ checkPin(pixel, pins, 4),
1378
+ checkPin(pixel, pins, 5)
1379
+ ];
1380
+
1381
+ let color = {color: cc_scaleList([(l[0] * 2) + l[1], (l[2] * 2) + l[3], (l[4] * 2) + l[5]], 255 / 3 * 10)};
1382
+ if (color.color.some(value => isNaN(value)))
1383
+ return;
1384
+
1385
+ if (isLightmapEnabled) {
1386
+ lightmap[Math.floor(pixel.y / lightmapScale)][Math.floor(pixel.x / lightmapScale)] = color;
1387
+ }
1388
+ let scaledColor = cc_scaleList(color.color, 0.1);
1389
+
1390
+ // pixelMap[pixel.x][pixel.y].color = scaledColor;
1391
+ for (let dx = -1; dx <= 1; dx++) {
1392
+ for (let dy = -1; dy <= 1; dy++) {
1393
+ let nx = pixel.x + dx;
1394
+ let ny = pixel.y + dy;
1395
+
1396
+ if (pixelMap[nx] && pixelMap[nx][ny]) {
1397
+ let n = ((2 - (Math.abs(dx) + Math.abs(dy))) + 4) / 6;
1398
+ pixelMap[nx][ny].color = cc_arrayToRgbString(cc_scaleList(scaledColor, n));
1399
+ }
1400
+ }
1401
+ }
1402
+ }
1403
+ }
1404
+
1405
+ let addDisplayCallback = function (pixel, pins, w, h) {
1406
+ for (let y = 1; y < h - 1; y++) {
1407
+ for (let x = 1; x < w - 1; x++) {
1408
+ let px = pixel.x + x;
1409
+ let py = pixel.y + y;
1410
+ if (!(0 <= px && px < width && 0 <= py && py < height)) {
1411
+ continue;
1412
+ }
1413
+
1414
+ deletePixel(px, py);
1415
+ createPixel("displayPixel", px, py);
1416
+ pixelMap[px][py].color = "rgb(16, 24, 32)";
1417
+ }
1418
+ }
1419
+ }
1420
+
1421
+ elements.simple_seven_segment_display = {
1422
+ cc_stableTick: function (pixel) {
1423
+ let pins = [
1424
+ // Data inputs (D0-D3)
1425
+ [-1, 7, true],
1426
+ [-1, 5, true],
1427
+ [-1, 3, true],
1428
+ [-1, 1, true],
1429
+ ];
1430
+
1431
+ initializeCircuit(pixel, pins, 5, 9, false, pixel.circuitRotation, addDisplayCallback);
1432
+
1433
+ // Read inputs
1434
+ let D = [
1435
+ checkPin(pixel, pins, 0),
1436
+ checkPin(pixel, pins, 1),
1437
+ checkPin(pixel, pins, 2),
1438
+ checkPin(pixel, pins, 3)
1439
+ ];
1440
+
1441
+ let hexNumber = (D[3] * 8) + (D[2] * 4) + (D[1] * 2) + (D[0] * 1);
1442
+ if (isNaN(hexNumber)) {
1443
+ return;
1444
+ }
1445
+
1446
+ // Draw the number
1447
+ let hexGrid = createSevenSegmentGrid(hexNumber);
1448
+ for (let y = 2; y <= 6; y++) {
1449
+ for (let x = 1; x <= 3; x++) {
1450
+ let px = pixel.x + x;
1451
+ let py = pixel.y + y;
1452
+
1453
+ if (pixelMap[px][py] && pixelMap[px][py].element === "displayPixel") {
1454
+ if (hexGrid[y - 2][x - 1]) {
1455
+ pixelMap[px][py].color = "rgb(16, 230, 120)";
1456
+ } else {
1457
+ pixelMap[px][py].color = "rgb(16, 24, 32)";
1458
+ }
1459
+ }
1460
+ }
1461
+ }
1462
+ }
1463
+ };
1464
+
1465
+ elements.simple_double_seven_segment_display = {
1466
+ cc_stableTick: function (pixel) {
1467
+ let pins = [
1468
+ // Data inputs (D0-D3)
1469
+ [-1, 7, true],
1470
+ [-1, 5, true],
1471
+ [-1, 3, true],
1472
+ [-1, 1, true],
1473
+
1474
+ [7, -1, true],
1475
+ [5, -1, true],
1476
+ [3, -1, true],
1477
+ [1, -1, true],
1478
+ ];
1479
+
1480
+ initializeCircuit(pixel, pins, 9, 9, false, pixel.circuitRotation, addDisplayCallback);
1481
+
1482
+ // Read inputs
1483
+ let D = [
1484
+ checkPin(pixel, pins, 0),
1485
+ checkPin(pixel, pins, 1),
1486
+ checkPin(pixel, pins, 2),
1487
+ checkPin(pixel, pins, 3),
1488
+ checkPin(pixel, pins, 4),
1489
+ checkPin(pixel, pins, 5),
1490
+ checkPin(pixel, pins, 6),
1491
+ checkPin(pixel, pins, 7)
1492
+ ];
1493
+
1494
+ let hexNumber = (D[3] * 8) + (D[2] * 4) + (D[1] * 2) + (D[0] * 1);
1495
+ let hexNumber2 = (D[7] * 8) + (D[6] * 4) + (D[5] * 2) + (D[4] * 1);
1496
+ if (isNaN(hexNumber) || isNaN(hexNumber2)) {
1497
+ return;
1498
+ }
1499
+
1500
+ // Draw the number
1501
+ let hexGrid = createSevenSegmentGrid(hexNumber);
1502
+ for (let y = 2; y <= 6; y++) {
1503
+ for (let x = 1; x <= 3; x++) {
1504
+ let px = pixel.x + x;
1505
+ let py = pixel.y + y;
1506
+
1507
+ if (pixelMap[px][py] && pixelMap[px][py].element === "displayPixel") {
1508
+ if (hexGrid[y - 2][x - 1]) {
1509
+ pixelMap[px][py].color = "rgb(16, 230, 120)";
1510
+ } else {
1511
+ pixelMap[px][py].color = "rgb(16, 24, 32)";
1512
+ }
1513
+ }
1514
+ }
1515
+ }
1516
+
1517
+ let hexGrid2 = createSevenSegmentGrid(hexNumber2);
1518
+ for (let y = 2; y <= 6; y++) {
1519
+ for (let x = 5; x <= 7; x++) {
1520
+ let px = pixel.x + x;
1521
+ let py = pixel.y + y;
1522
+
1523
+ if (pixelMap[px][py] && pixelMap[px][py].element === "displayPixel") {
1524
+ if (hexGrid2[y - 2][x - 5]) {
1525
+ pixelMap[px][py].color = "rgb(16, 230, 120)";
1526
+ } else {
1527
+ pixelMap[px][py].color = "rgb(16, 24, 32)";
1528
+ }
1529
+ }
1530
+ }
1531
+ }
1532
+ }
1533
+ };
1534
+
1535
+ function malfunction_chip(pixel) {
1536
+ let emptySpaces = [];
1537
+
1538
+ // Search in a 5x5 neighborhood for empty spaces
1539
+ for (let dy = -2; dy <= 2; dy++) {
1540
+ for (let dx = -2; dx <= 2; dx++) {
1541
+ let neighborX = pixel.x + dx;
1542
+ let neighborY = pixel.y + dy;
1543
+ if (pixelMap[neighborX] && pixelMap[neighborX][neighborY] === undefined) {
1544
+ emptySpaces.push({x: neighborX, y: neighborY});
1545
+ }
1546
+ }
1547
+ }
1548
+
1549
+ if (emptySpaces.length > 0) {
1550
+ // Randomly select one of the empty spaces
1551
+ let randomSpace = emptySpaces[Math.floor(Math.random() * emptySpaces.length)];
1552
+
1553
+ // Determine what to spawn based on probability
1554
+ let rand = Math.random();
1555
+ if (rand < 0.7) {
1556
+ createPixel("electric", randomSpace.x, randomSpace.y);
1557
+ } else if (rand < 0.99) {
1558
+ createPixel("fire", randomSpace.x, randomSpace.y);
1559
+ } else {
1560
+ createPixel("explosion", randomSpace.x, randomSpace.y);
1561
+ }
1562
+ }
1563
+ }
1564
+
1565
+ elements.displayPixel = {
1566
+ color: "#000000",
1567
+ category: "logic",
1568
+ state: "solid",
1569
+ behavior: behaviors.WALL,
1570
+ tick: function (pixel) {
1571
+ if (pixel.start === pixelTicks) {
1572
+ pixel.color = "rgb(16, 24, 32)";
1573
+ }
1574
+
1575
+ if (isLightmapEnabled && pixel.color) {
1576
+ let x = Math.floor(pixel.x / lightmapScale);
1577
+ let y = Math.floor(pixel.y / lightmapScale);
1578
+ lightmap[y][x] = {color: scaleList(rgbToArray(pixel.color), 0.2)};
1579
+ }
1580
+ }
1581
+ };
1582
+
1583
+ elements.circuit_material = {
1584
+ color: "#444444",
1585
+ category: "logic",
1586
+ state: "solid",
1587
+ behavior: behaviors.WALL,
1588
+ hoverStat: function (pixel) {
1589
+ return `Circuit: ${pixel.corePosition}`;
1590
+ },
1591
+ cc_stableTick: function (pixel) {
1592
+ // Make it that extreme temperatures can stop the chip from working (for realism)
1593
+ if (Math.random() < 0.003 && cc_heat_emit_setting.value) { // Chance to check for temperature or nearby particles
1594
+ // Check temperature
1595
+ if (pixel.temp > 120) {
1596
+ // Replace the circuit core with lead if overheating
1597
+ if (pixel.corePosition && Math.random() < (0.00015) * (pixel.temp - 120)) {
1598
+ let corePos = pixel.corePosition;
1599
+ if (pixelMap[corePos.x] && pixelMap[corePos.x][corePos.y]) {
1600
+ deletePixel(corePos.x, corePos.y);
1601
+ createPixel("lead", corePos.x, corePos.y);
1602
+ }
1603
+ }
1604
+
1605
+ // Randomly trigger malfunction if overheating
1606
+ if (Math.random() < 0.001 * (pixel.temp - 120)) {
1607
+ malfunction_chip(pixel);
1608
+ }
1609
+
1610
+ // Break the circuit material itself if overheating
1611
+ if (Math.random() < 0.001 * (pixel.temp - 120)) {
1612
+ let px = pixel.x;
1613
+ let py = pixel.y;
1614
+ deletePixel(px, py);
1615
+ if (Math.random() < 0.5) {
1616
+ createPixel("lead", px, py);
1617
+ }
1618
+ }
1619
+ }
1620
+ }
1621
+ }
1622
+ };
1623
+
1624
+
1625
+ elements.input_pin = {
1626
+ color: "#DDAA33",
1627
+ category: "logic",
1628
+ state: "solid",
1629
+ active: false,
1630
+ stateHigh: "lead",
1631
+ tempHigh: 570,
1632
+ behavior: behaviors.WALL,
1633
+ cc_stableTick: function (pixel) {
1634
+ pixel.active = false;
1635
+ let neighbors = getNeighbors(pixel);
1636
+ for (let i = 0; i < neighbors.length; i++) {
1637
+ let neighbor = neighbors[i];
1638
+
1639
+ if (neighbor.charge > 0 || neighbor.lstate === 2 || neighbor.active) {
1640
+ pixel.active = true;
1641
+ }
1642
+ }
1643
+ }
1644
+ };
1645
+
1646
+ elements.output_pin = {
1647
+ color: "#AAAAAA",
1648
+ category: "logic",
1649
+ state: "solid",
1650
+ active: false,
1651
+ stateHigh: "lead",
1652
+ tempHigh: 570,
1653
+ behavior: behaviors.WALL,
1654
+ cc_stableTick: function (pixel) {
1655
+ let neighbors = getNeighbors(pixel);
1656
+ for (let i = 0; i < neighbors.length; i++) {
1657
+ let neighbor = neighbors[i];
1658
+
1659
+ // Check if it's a wire
1660
+ if (elements[neighbor.element].conduct > 0 && pixel.active) {
1661
+ neighbor.charge = 1;
1662
+ }
1663
+
1664
+ // Check if it's a logic wire (logicgates.js)
1665
+ if (neighbor.lstate !== undefined) {
1666
+ if (pixel.active) {
1667
+ neighbor.lstate = 2;
1668
+ neighbor.color = pixelColorPick(neighbor, "#ffe49c");
1669
+ } else {
1670
+ neighbor.lstate = -2;
1671
+ neighbor.color = pixelColorPick(neighbor, "#3d4d2c");
1672
+ }
1673
+ }
1674
+ }
1675
+ }
1676
+ };
1677
+
1678
+ elements.logic_corrupt = {
1679
+ color: "#DD33DD",
1680
+ category: "logic",
1681
+ tool: function (pixel) {
1682
+ if (pixel.element === "logic_wire") {
1683
+ if (Math.random() < 0.01) {
1684
+ if (Math.random() < 0.5) {
1685
+ pixel.lstate = 2;
1686
+ pixel.color = pixelColorPick(pixel, "#ffe49c");
1687
+ } else {
1688
+ pixel.lstate = -2;
1689
+ pixel.color = pixelColorPick(pixel, "#3d4d2c");
1690
+ }
1691
+ }
1692
+ }
1693
+ },
1694
+ excludeRandom: true,
1695
+ }
1696
+
1697
+ elements.logic_corrupter_machine = {
1698
+ color: "#DD33DD",
1699
+ category: "logic",
1700
+ cc_stableTick: function (pixel) {
1701
+ let radius = 10
1702
+ for (let y = pixel.y - radius; y < pixel.y + radius; y++) {
1703
+ for (let x = pixel.x - radius; x < pixel.x + radius; x++) {
1704
+ if (!isEmpty(x, y, true)) {
1705
+ if (pixelMap[x][y].element === "logic_wire" && Math.random() < Math.min(Math.max((pixel.temp + 273) / 473, 0), 1) * 0.005) {
1706
+ if (Math.random() < 0.5) {
1707
+ pixelMap[x][y].lstate = 2
1708
+ pixelMap[x][y].color = pixelColorPick(pixelMap[x][y], "#ffe49c")
1709
+ } else {
1710
+ pixelMap[x][y].lstate = -2
1711
+ pixelMap[x][y].color = pixelColorPick(pixelMap[x][y], "#3d4d2c")
1712
+ }
1713
+ }
1714
+ }
1715
+ }
1716
+ }
1717
+ },
1718
+ }
1719
+
1720
+ // Add link to documentation
1721
+ let tutorialLink = document.createElement("a");
1722
+ tutorialLink.textContent = "CircuitCore Tutorial";
1723
+ tutorialLink.href = "https://redbirdly.github.io/circuitcore_tutorial.html";
1724
+ tutorialLink.target = "_blank";
1725
+ tutorialLink.style.color = "#33FF66";
1726
+ tutorialLink.style.fontSize = "14px";
1727
+ document.body.appendChild(tutorialLink);
1728
+
1729
+ // cc_ is circuit core prefix
1730
+ const cc_BROWN = "#773317";
1731
+ const cc_RED = "#DD3322";
1732
+ const cc_ORANGE = "#DD8833";
1733
+ const cc_YELLOW = "#DDCC44";
1734
+ const cc_LIME = "#77DD44";
1735
+ const cc_GREEN = "#33BB44";
1736
+ const cc_BLUE = "#224499";
1737
+ const cc_LIGHT_BLUE = "#77CCFF";
1738
+ const cc_LAVENDER = "#AA88EE";
1739
+ const cc_WHITE = "#DDDDDD";
1740
+
1741
+ let circuits = [
1742
+ // Misc and I/O: brown
1743
+ {circuit: elements.four_bit_selector_circuit, color: cc_BROWN, size: [17, 3, true]},
1744
+ {circuit: elements.four_bit_enabler_circuit, color: cc_BROWN, size: [9, 3, true]},
1745
+ {circuit: elements.randomizer, color: cc_BROWN},
1746
+ {circuit: elements.four_bit_randomizer_circuit, color: cc_BROWN, size: [9, 3, true]},
1747
+ {circuit: elements.two_bit_reverser_circuit, color: cc_BROWN, size: [5, 3, true]},
1748
+ {circuit: elements.reverser_circuit, color: cc_BROWN},
1749
+ // ROM/RAM: red
1750
+ // { circuit: elements.ROM_circuit, color: cc_RED, size: [18, 18, false] },
1751
+ // Encoders and de-multiplexers: orange
1752
+ {circuit: elements.two_to_one_encoder_circuit, color: cc_ORANGE, size: [5, 3, true]},
1753
+ {circuit: elements.four_to_two_encoder_circuit, color: cc_ORANGE, size: [9, 5, true]},
1754
+ {circuit: elements.eight_to_three_encoder_circuit, color: cc_ORANGE, size: [17, 7, true]},
1755
+ {circuit: elements.sixteen_to_four_encoder_circuit, color: cc_ORANGE, size: [33, 9, true]},
1756
+
1757
+ {circuit: elements.one_to_two_demultiplexer_circuit, color: cc_ORANGE, size: [3, 5, true]},
1758
+ {circuit: elements.one_to_four_demultiplexer_circuit, color: cc_ORANGE, size: [3, 9, true]},
1759
+ {circuit: elements.one_to_eight_demultiplexer_circuit, color: cc_ORANGE, size: [3, 17, true]},
1760
+ {circuit: elements.one_to_sixteen_demultiplexer_circuit, color: cc_ORANGE, size: [3, 33, true]},
1761
+ // Decoders and multiplexers: yellow
1762
+ {circuit: elements.one_to_two_decoder_circuit, color: cc_YELLOW, size: [3, 5, true]},
1763
+ {circuit: elements.two_to_four_decoder_circuit, color: cc_YELLOW, size: [5, 9, true]},
1764
+ {circuit: elements.three_to_eight_decoder_circuit, color: cc_YELLOW, size: [7, 17, true]},
1765
+ {circuit: elements.four_to_sixteen_decoder_circuit, color: cc_YELLOW, size: [9, 33, true]},
1766
+
1767
+ {circuit: elements.two_to_one_multiplexer_circuit, color: cc_YELLOW, size: [3, 5, true]},
1768
+ {circuit: elements.four_to_one_multiplexer_circuit, color: cc_YELLOW, size: [5, 9, true]},
1769
+ {circuit: elements.eight_to_one_multiplexer_circuit, color: cc_YELLOW, size: [7, 17, true]},
1770
+ {circuit: elements.sixteen_to_one_multiplexer_circuit, color: cc_YELLOW, size: [9, 33, true]},
1771
+ // Program counter and shift registers: lime
1772
+ {circuit: elements.four_bit_PISO_shift_register_circuit, color: cc_LIME, size: [9, 5, true]},
1773
+ {circuit: elements.four_bit_SIPO_shift_register_circuit, color: cc_LIME, size: [3, 9, true]},
1774
+ {circuit: elements.four_bit_program_counter_circuit, color: cc_LIME, size: [9, 5, true]},
1775
+ // Registers: green
1776
+ {circuit: elements.four_bit_register_circuit, color: cc_GREEN, size: [9, 5, true]},
1777
+ // Latches and flip-flops: light blue
1778
+ {circuit: elements.SR_latch_circuit, color: cc_LIGHT_BLUE, size: [3, 3, true]},
1779
+ {circuit: elements.T_flip_flop_circuit, color: cc_LIGHT_BLUE, size: [3, 3, true]},
1780
+ {circuit: elements.D_latch_circuit, color: cc_LIGHT_BLUE, size: [3, 3, true]},
1781
+ {circuit: elements.D_flip_flop_circuit, color: cc_LIGHT_BLUE, size: [3, 3, true]},
1782
+ {circuit: elements.four_bit_D_latch_circuit, color: cc_LIGHT_BLUE, size: [9, 3, true]},
1783
+ {circuit: elements.four_bit_D_flip_flop_circuit, color: cc_LIGHT_BLUE, size: [9, 3, true]},
1784
+ // Addition/subtraction arithmetic: blue
1785
+ {circuit: elements.four_bit_adder_circuit, color: cc_BLUE, size: [17, 3, true]},
1786
+ {circuit: elements.four_bit_subtractor_circuit, color: cc_BLUE, size: [17, 3, true]},
1787
+ {circuit: elements.four_bit_incrementer_circuit, color: cc_BLUE, size: [9, 3, true]},
1788
+ // Complex circuits: lavender
1789
+
1790
+ // Clocks: pink
1791
+ {circuit: elements.slow_clock},
1792
+ {circuit: elements.medium_clock},
1793
+ {circuit: elements.fast_clock},
1794
+ {circuit: elements.very_fast_clock},
1795
+ // Displays/visual circuits: white
1796
+ {circuit: elements.simple_seven_segment_display, color: cc_WHITE, size: [5, 9, false]},
1797
+ {circuit: elements.simple_double_seven_segment_display, color: cc_WHITE, size: [9, 9, false]},
1798
+ {circuit: elements.custom_RGB_led, color: cc_WHITE, size: [3, 3, true]},
1799
+ ];
1800
+
1801
+ circuits.forEach(circuitInfo => {
1802
+ if (circuitInfo.color) {
1803
+ circuitInfo.circuit.color = circuitInfo.color;
1804
+ }
1805
+ circuitInfo.circuit.category = "logic";
1806
+ circuitInfo.circuit.maxSize = 1;
1807
+ circuitInfo.circuit.behavior = behaviors.WALL;
1808
+ circuitInfo.circuit.state = "solid";
1809
+ circuitInfo.circuit.isCircuitCore = true;
1810
+ circuitInfo.circuit.previewSize = circuitInfo.size;
1811
+
1812
+ // Exclude circuits without a frame
1813
+ if (circuitInfo.size) {
1814
+ let previousCircuitTick = circuitInfo.circuit.cc_stableTick;
1815
+ circuitInfo.circuit.cc_stableTick = function (pixel) {
1816
+ previousCircuitTick(pixel);
1817
+
1818
+ // Don't constantly check
1819
+ if (Math.random() < 0.1) {
1820
+ // If there aren't 4 neighboring circuit_material elements then remove the circuit's core
1821
+ let neighbors = getNeighbors(pixel);
1822
+ let circuitMaterialCount = 0;
1823
+ for (let i = 0; i < neighbors.length; i++) {
1824
+ if (neighbors[i].element === "circuit_material") {
1825
+ circuitMaterialCount++;
1826
+ }
1827
+ }
1828
+
1829
+ if (circuitMaterialCount < 2) {
1830
+ deletePixel(pixel.x, pixel.y);
1831
+ }
1832
+
1833
+ // Check if circuit overheating is enabled
1834
+ if (cc_heat_emit_setting.value) {
1835
+ pixel.temp += Math.random() * 0.7;
1836
+ }
1837
+ }
1838
+ }
1839
+ }
1840
+ });
1841
+
1842
+ let circuitRotation = 0;
1843
+ document.addEventListener('keydown', function (event) {
1844
+ if (event.key === 'ArrowUp') {
1845
+ circuitRotation = (circuitRotation + 90) % 360;
1846
+ logMessage('CircuitRotation changed to ' + circuitRotation);
1847
+ }
1848
+ });
1849
+
1850
+ function drawCircuitExtras(ctx) {
1851
+ if (elements[currentElement].isCircuitCore && elements[currentElement].previewSize) {
1852
+ let circuitWidth = elements[currentElement].previewSize[0];
1853
+ let circuitHeight = elements[currentElement].previewSize[1];
1854
+ let centered = elements[currentElement].previewSize[2];
1855
+ let rotation = circuitRotation;
1856
+
1857
+ let startX = 0;
1858
+ let startY = 0;
1859
+ let endX = circuitWidth - 1;
1860
+ let endY = circuitHeight - 1;
1861
+
1862
+ if (centered) {
1863
+ startX = -Math.floor(circuitWidth / 2);
1864
+ startY = -Math.floor(circuitHeight / 2);
1865
+ endX = Math.floor(circuitWidth / 2);
1866
+ endY = Math.floor(circuitHeight / 2);
1867
+ }
1868
+
1869
+ for (let y = startY; y <= endY; y++) {
1870
+ for (let x = startX; x <= endX; x++) {
1871
+ // if (!(0 <= x && x < width && 0 <= y && y < height)) {continue;}
1872
+
1873
+ let [rx, ry] = rotateCoordinateAroundOrigin(x, y, rotation);
1874
+ let px = mousePos.x + rx;
1875
+ let py = mousePos.y + ry;
1876
+
1877
+ ctx.fillStyle = "rgba(255, 255, 255, 0.1)";
1878
+ if ((rotation !== 0 && !centered) || (0 <= px && px < width && 0 <= py && py < height) && pixelMap[px][py]) {
1879
+ ctx.fillStyle = "rgba(255, 0, 0, 0.3)";
1880
+ }
1881
+
1882
+ ctx.fillRect(px * pixelSize, py * pixelSize, pixelSize, pixelSize);
1883
+ }
1884
+ }
1885
+ }
1886
+ }
1887
+
1888
+ function runLogicTick() {
1889
+ for (let i = 0; i < currentPixels.length; i++) {
1890
+ const pixel = currentPixels[i];
1891
+ const elementData = elements[pixel.element];
1892
+
1893
+ if (elementData.cc_stableTick) {
1894
+ elementData.cc_stableTick(pixel);
1895
+ }
1896
+ }
1897
+ }
1898
+
1899
+ function stabilizeLogicGates() {
1900
+ let logicgatesElements = ["output", "logic_wire", "not_gate", "and_gate", "xor_gate", "or_gate", "nand_gate", "nor_gate", "nxor_gate", "E2L_lever", "E2L_button", "L2E_constant", "logic_shock", "logic_unshock"]
1901
+
1902
+ for (let i = 0; i < logicgatesElements.length; i++) {
1903
+ elements[logicgatesElements[i]].cc_stableTick = elements[logicgatesElements[i]].tick;
1904
+ elements[logicgatesElements[i]].tick = null;
1905
+ }
1906
+ }
1907
+
1908
+ // Hooks
1909
+ renderPostPixel(drawCircuitExtras);
1910
+ runEveryTick(runLogicTick);
1911
+
1912
+ if (cc_stable_tick_setting.value)
1913
+ runAfterLoad(stabilizeLogicGates);
1914
+