This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<material id="skyMat"> | |
<texture_cube id="sky" src_pos_x="posx.png" src_neg_x="negx.png" src_pos_y="posy.png" src_neg_y="negy.png" src_pos_z="posz.png" src_neg_z="negz.png" /> | |
<material_layer texture="#sky" mapinput="MAP_ENV" mapto="M_COLOR" /> | |
</material> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<material id="water" specular="1.0" shininess="2"> | |
<texture id="waterheight" src="waterheight.jpg" /> | |
<material_layer texture="#waterheight" mapinput="UV1" frame_rate="25" height="0.07" animation="#flow" mapto="M_HEIGHT" scale_x="0.8" scale_y="0.8" /> | |
<texture id="waternormal" src="waternormal.jpg" /> | |
<material_layer texture="#waternormal" mapinput="UV1" mapto="M_NOR" scale_x="0.5" scale_y="0.5" /> | |
<texture_camera camera="#mainCamera" id="watercolor1" clip_axis="POS_ZAXIS" /> | |
<material_layer texture="#watercolor1" mapinput="MAP_VIEW" mapto="M_COLOR" /> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var getAbsolutePath=function(path,relativeto){ | |
if(!relativeto) relativeto=window.location.href; | |
if(!relativeto) return path; | |
//remove ? and # from relative to | |
if(~relativeto.indexOf("?")){ | |
relativeto=relativeto.substr(0,relativeto.indexOf("?")); | |
}else if(~relativeto.indexOf("#")){ | |
relativeto=relativeto.substr(0,relativeto.indexOf("#")); | |
} | |
var pathParts=path.split("/"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<physics_car id="car" loc_y="5.5" mass="15" width="4" depth="0.5" height="1"> | |
<collada document="car.dae" id="carObject" scale="0.3" scale_y="-0.3" /> | |
<physics_wheel id="wheel1" loc_x="1.4" loc_z="0.9" loc_y="-0.2" radius="0.5" travel="0.6" spring="150" side_friction="3" front_friction="10"> | |
<collada document="wheel.dae" id="wheel1obj" scale="0.3" scale_y="-0.3" /> | |
</physics_wheel> | |
<physics_wheel id="wheel2" loc_x="1.4" loc_z="-0.9" loc_y="-0.2" radius="0.5" travel="0.6" spring="150" side_friction="3" front_friction="10"> | |
<collada document="wheel.dae" id="wheel2obj" scale="0.3" /> | |
</physics_wheel> | |
<physics_wheel id="wheel3" powered="TRUE" loc_x="-1.7" loc_z="0.9" loc_y="-0.2" radius="0.5" travel="0.6" spring="150" side_friction="3" front_friction="10"> | |
<collada document="wheel.dae" id="wheel3obj" scale="0.3" scale_y="-0.3" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var wheel1 = new GLGE.PhysicsWheel(); | |
wheel1.setRadius(0.5).setLocX(1.4).setLocY(-0.2).setLocY(0.9); | |
var wheel1Obj=new GLGE.Collada(); | |
wheel1Obj.setDocument("wheel.dae"); | |
wheel1.addCollada(wheel1Obj); | |
var wheel2 = new GLGE.PhysicsWheel(); | |
wheel2.setRadius(0.5).setLocX(1.4).setLocY(-0.2).setLocY(-0.9); | |
var wheel2Obj=new GLGE.Collada(); | |
wheel2Obj.setDocument("wheel.dae"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<style> | |
body{ | |
font-family: sans; | |
padding: 10px; | |
} | |
svg path{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<title>Diamond-square</title> | |
</head> | |
<body> | |
<script> | |
// PRNG | |
function random(i) { | |
return (Math.sin(Math.sin(1e9*i)*1e6)+1)*0.5; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function gaussianRandom(mean,sigma){ | |
var u = Math.random(); | |
return (u%1e-8>5e-9?1:-1)*Math.sqrt(-Math.log(Math.max(1e-9,u)))*sigma+mean; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var seed=Math.random() | |
var random3=function(x,y,z){ | |
var f=(Math.abs(x)+1e4)*(Math.abs(y)+2e4)*(Math.abs(z)+3e4); | |
var a=(f%seed)/seed; | |
var b=(f%a)/a; | |
return b; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bl_info = { | |
"name": "Yet Anonther POM Addon", | |
"description": "Adds a Parallax Occlution Mapping Node to the shader editor", | |
"version": (1,0,0), | |
"blender": (3, 0, 0), | |
"category": "Material", | |
} | |
import bpy | |
from bpy.types import ShaderNodeCustomGroup, Image |