(CC-BY-NC-SA 4.0 by karminski-牙医)
(CC-BY-NC-SA 4.0 by karminski-牙医)
请使用Python和pygame库,创建一个二维流体模拟程序。该程序需要模拟液体(由大量粒子代表)在重力作用下从一个正在倾斜的杯子中倒出的过程。
(CC-BY-NC-SA 4.0 by karminski-牙医)
Please use three.js to implement a realistic "firecracker box" 3D explosion chain reaction demonstration. All code (including HTML, CSS, JavaScript) must be encapsulated in a single, standalone HTML file.
Scene Setup:
{color: 0x808080, roughness: 0.8, metalness: 0.1}.(CC-BY-NC-SA 4.0 by karminski-牙医)
Please use three.js to implement a realistic "Elephant Toothpaste" chemical experiment 3D demonstration. All code (including HTML, CSS, JavaScript) must be encapsulated in a single independent HTML file.
Scene Setup:
| import collections, random, sys, textwrap | |
| # Build possibles table indexed by pair of prefix words (w1, w2) | |
| w1 = w2 = '' | |
| possibles = collections.defaultdict(list) | |
| for line in sys.stdin: | |
| for word in line.split(): | |
| possibles[w1, w2].append(word) | |
| w1, w2 = w2, word |
| /* | |
| * This is an experimental view library that would compete with react, svelte, qwik.js, vue.js etc. | |
| * | |
| * Implementation reference: https://git.sr.ht/~erock/alpfx | |
| * | |
| * Features: | |
| * - Instead of `view = func(state)` we have `view = func(event)` | |
| * - This paradigm shift will: | |
| * - make prop mgmt (e.g. when to update component) more manual | |
| * - animations easier (events or transitions are sent to the component that the end-user |
| import { Texture, ImageLoader, DefaultLoadingManager, RGBAFormat, RGBFormat } from 'three'; | |
| function TextureAtlasLoader(manager) { | |
| this.manager = manager || DefaultLoadingManager; | |
| } | |
| Object.assign(TextureAtlasLoader.prototype, { | |
| crossOrigin: "Anonymous", | |
| tileWidth: 16, | |
| tileHeight: 16, |
A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.