Skip to content

Instantly share code, notes, and snippets.

LEGAL DISCLAIMER
This product is meant for educational purposes only. Any resemblance to real persons, living or dead is purely coincidental. Void where prohibited. Some assembly required. Batteries not included. Contents may settle during shipment. Use only as directed. No other warranty expressed or implied. Do not use while operating a motor vehicle or heavy machinery. This is not an offer to sell securities. Apply only to affected area. May be too intense for some viewers. Do not stamp. For recreational use only. Do not disturb. All models over 18 years of age. No user-serviceable parts inside. Freshest if eaten before date on carton. Subject to change without notice. Times approximate. Simulated picture. Please remain seated until the ride has come to a complete stop. Breaking seal constitutes acceptance of agreement. For off-road use only. As seen on TV. One size fits all. Contains a substantial amount of non-tobacco ingredients. Colors may, in time, fade. Slippery when wet.
For office use only. Not
@Sgeo
Sgeo / notes.md
Last active February 5, 2020 07:25
Flashpoint VRML Notes

Blaxxun 4.4

  • Place files somewhere under ActiveX
  • Use startActiveX.bat

Live3D

  • Apache's mime.types VRML model/vrml -> x-world/x-vrml. Live3D does not mark itself as understanding model/vrml
  • basilisk-portable's ini MOZ_PLUGIN_PATH includes FP_VRML_PATH. Batch file sets
  • Set PATH to include DLLs, so they're visible.

Cosmo

  • CosmoPlayer installer seems to call regsvr32 on some of the DLLs. Replicate. See what other devs say.
  • All DLLs copied under VRML/Cosmo211/
let x(t) = distance from dest on x
let y(t) = distance from dest on y
let z(t) = distance from dest on z
let r(t)^2 = x(t)^2 + y(t)^2 + z(t)^2
let f(t) = force
x(0) initial condition
y(0) initial condition
z(0) initial condition
f(t)
a(0)
b(0)
a(t) = (b(t) - a(0))t + a(0)
b(t) = (a(t) - b(0))t + b(0)
a(t) = (((a(t) - b(0))t + b(0)) - a(0))t + a(0)
a(t) = t^2 (a(t) - b(0)) + t (b(0) - a(0)) + a(0)
Assumptions: Start at 0, time = t goes from 0 to 1
let b = end of move action
let c = end of 1st SetPoint3Action
let d = end of 2nd SetPoint3Action
let e = end of 3rd SetPoint3Action
let d(t) = (e-d)t + d
let c(t) = (d(t) - c)t + c
let b(t) = (c(t) - b)t + b
let a = start position
let b = end position
p(t) = (b-a)t + a
let d = SetMove3Action's end point
p(t) = ((d-b)t+b)t + a = (dt - bt + b)t + a = (d-b)t^2 + bt + a
let d = 0, then p(t) = -bt^2 + bt + a
@Sgeo
Sgeo / SOs.json
Created October 18, 2019 04:07
X_ITE SharedObjects
[
{
"name": "5000 EXP Trophy",
"id": "5000exp",
"url": "/dbobjects/5000/5000exp.wrl",
"position": {"x": 0.0, "y": 1.75, "z": 0.0},
"rotation": {"x": 0.0, "y": 1.0, "z": 0.0, "angle": 0.0}
}
]
@Sgeo
Sgeo / fixgray.js
Last active October 2, 2019 04:50
// This code is NOT spec compliant: An RGB texture can be mistaken for an intensity texture if all its pixels happen to be gray.
// I suspect this will not particularly affect a lot of textures, but it is a possibility
// This also needs to check all URLs rather than the first, preferably the same way X3DOM does if possible
// Also better error handling
function fixGray(imageTexture) {
var url = imageTexture.getFieldValue("url")[0];
var img = new Image();
@Sgeo
Sgeo / DNA.cpp
Created August 9, 2019 04:48
Source code for Langton's loops CA in MCell
/* DNA.cpp
*
* This automata was designed by Christopher G. Langton at the University
* of Michigan, and is described in his article "Self-Reproduction in
* Cellular Automata", published in the book "Cellular Automata" in 1984.
*
* As described in the above article, this automata is "realistic" and
* "non-trivial", in the following ways:
*
* The reproduction is not simply due to the particular rules used in
#include <stdio.h>
#include <stdarg.h>
#include <dos.h>
#include <i86.h>
#include <conio.h>
#include "vfx1.h"
extern unsigned _psp;
unsigned __far *psp_pointer;
unsigned _get_memsize();