This document assumes you are building a traditional backend-heavy application as opposed to a frontend-heavy appliction which would typically use a framework like Angular or React. The use of these frameworks make this document irrelevant, however also require a change to your application architecture and a much larger overhead in order to get content onto a page, so as a simple way to build interactive web content a simple jquery based js stack will do fine.
It's important you use a directory structure which is impartial to your development environment, chosen server language (Python v. Java v. C# ...), and styling framwork (Twitter Bootstrap etc). This layer of separation means you can swap out the styles or the backend with minimal changes to the Js, simple and maintainable.
Here's an example from the project root:
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.
| Name | Stars | Last Commit | Description |
|---|---|---|---|
| three.js | ![GitH |
| #!/bin/bash | |
| # | |
| # Script to convert MP4 video to GIF with generation of custom color palette. | |
| # | |
| #=== Do not touch code below | |
| # Inner variables | |
| input_file="" | |
| input_fps="20" | |
| input_height="512" |
| class Mom: | |
| def on_door_opened(self): | |
| print("Who's there?") | |
| class Priest: | |
| def on_door_opened(self): | |
| print("Is it police? Run!") | |
| // From the book: Graphics Shaders | |
| vec3 CMYKtoRGB (vec4 cmyk) { | |
| float c = cmyk.x; | |
| float m = cmyk.y; | |
| float y = cmyk.z; | |
| float k = cmyk.w; | |
| float invK = 1.0 - k; | |
| float r = 1.0 - min(1.0, c * invK + k); |
| KEYMAPOPTS="us us" | |
| HOSTNAMEOPTS="-n alpine" | |
| INTERFACESOPTS="auto lo | |
| iface lo inet loopback | |
| auto eth0 | |
| iface eth0 inet dhcp | |
| hostname alpine | |
| " | |
| TIMEZONEOPTS="-z UTC" |
For local development you could also use Nginx with PHP as an replacement for XAMPP.
- Download Nginx for Windows: http://nginx.org/en/download.html | Direct: nginx-1.19.7.zip
- Extract the ZIP file to
c:\nginx - Open the file
c:/nginx/config/nginx.confand replace theserver { ... }section with this configuration:
A metatable in Lua defines various extraneous behaviors for a table when indexed, modified, interacted with, etc. They are Lua's core metaprogramming feature; most well known for being useful to emulate classes much like an OOP language.
Any table (and userdata) may be assigned a metatable. You can define a metatable for a table as such:
-- Our sample table
local tab = {}
-- Our metatable
local metatable = {
-- This table is then what holds the metamethods or metafields| #!/usr/bin/env bash | |
| # Initialize variables to customize output | |
| : "${FFILE:="${HOME}/.fonts/i/impact.ttf"}" # Let user choose font file | |
| : "${FSIZE:=72}" # Let user choose font size in px | |
| : "${BSIZE:=5}" # Let user choose stroke size in px | |
| : "${OFFSET:='(h*0.05)'}" # Let user choose text offset in px | |
| # TTEXT - Text to display at the top of the image | |
| # BTEXT - Text to display at the bottom of the image | |
| # Exit value index: |