Skip to content

Instantly share code, notes, and snippets.

View andreasplesch's full-sized avatar

Andreas Plesch andreasplesch

  • Earthstruct
  • Waltham, MA
View GitHub Profile
@andreasplesch
andreasplesch / interpolators.x3d
Last active July 16, 2023 14:37
interpolator test
<X3D>
<Scene>
<worldinfo info="&quot;generator:Khronos Blender glTF 2.0 I/O&quot; &quot;version:2.0&quot; " title=""></worldinfo>
<transform def="glTF_NODE_Cube" render="true" visible="true" bboxcenter="0,0,0" bboxsize="-1,-1,-1" bboxdisplay="false" bboxmargin="0.01" bboxcolor="1,1,0" center="0,0,0" translation="0,0,0" rotation="0,0,0,0" scale="1,1,1" scaleorientation="0,0,0,0" id="gltf__glTF_NODE_Cube">
<shape render="true" visible="true" bboxcenter="0,0,0" bboxsize="-1,-1,-1" bboxdisplay="false" bboxmargin="0.01" bboxcolor="1,1,0" ispickable="true" idoffset="0">
<appearance sorttype="opaque" alphaclipthreshold="0" sortkey="0">
<physicalmaterial def="glTF_MATERIAL_Material" basecolorfactor="0.800000011920929 0.800000011920929 0.800000011920929 1" metallicfactor="0" roughnessfactor="0.5" emissivefactor="0 0 0" alphamode="OPAQUE" alphacutoff="0.5" model="roughnessMetallic" diffusefactor="1,1,1,1" specularfactor="1,1,1" glossinessfactor="1" normalspace="TANGENT" normalbias="-1,
@andreasplesch
andreasplesch / BoxWithHoles183.x3d
Last active July 15, 2023 11:48
x3dom_issue1279
<X3D>
<Scene>
<Viewpoint description="defaultX3DView"/>
<Viewpoint position="-1.18765 -0.23318 3.09144" orientation="0.17376 -0.97635 0.12868 0.27417"
centerOfRotation="0 0 -1.25" description="obliqueThroughSquareCutout" />
<Viewpoint position="1.74165 0.07545 2.90619" orientation="-0.04242 0.99909 0.00430 0.39716" centerOfRotation="0 0 -1.25" description="obliqueThroughRoundCutout" />
<!--The next shape in red is created in order to later provide it with holes. To make this possible, the shape must be given a sortkey that is larger than the sortkey of the shapes that represent the hole. In addition, the shape must have at least a slight tranzparency.
transparency='0.01'
sortkey='2'
-->
@andreasplesch
andreasplesch / x3dom-full.debug.js
Last active June 15, 2023 02:40
x3dom fogShadow build
This file has been truncated, but you can view the full file.
/**
* X3DOM 1.8.3-dev
* Build : 7485
* Revision: 0240456c61a561eb07466bd6ac579120b9cbe376
* Date: Wed Jun 14 22:24:09 2023 -0400
*/
/**
* X3DOM JavaScript Library
* http://www.x3dom.org
*
This file has been truncated, but you can view the full file.
<?xml version="1.0" encoding="UTF-8"?>
<!-- X3D Unified Object Model (X3DUOM) X3dUnifiedObjectModel-4.0.xml -->
<!-- Online at https://www.web3d.org/specifications/X3dUnifiedObjectModel-4.0.xml -->
<!-- This file contains a listing of all abstract and concrete nodes in version 4.0 of X3D -->
<!-- Generated 2023-04-15-07:00 23:10:11.9434556-07:00 -->
<X3dUnifiedObjectModel xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance"
version="4.0"
xsd:noNamespaceSchemaLocation="X3dUnifiedObjectModel.xsd">
<SimpleTypeEnumerations>
<!-- For schema xs:simpleType with contained xs:enumeration definitions, follow naming convention of name ending in 'Type', 'Choices' (for strict enumeration set) or 'Values' (for suggested tokens). -->
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "JSON Schema X3D V3.3",
"description": "Experimental JSON Schema for X3D V3.3 ",
"type": "object",
"properties": {
"X3D": {
"$ref": "#/definitions/X3D"
}
},
@andreasplesch
andreasplesch / beermugholder.stl
Created April 30, 2023 19:53
holder exported from jscad
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<?xml version="1.0" encoding="UTF-8"?>
<X3D profile="Interchange" version="3.3" xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance" xsd:noNamespaceSchemaLocation="http://www.web3d.org/specifications/x3d-3.3.xsd">
<head>
<meta name="creator" content="Created by JSCAD"/>
<meta name="reference" content="https://www.openjscad.xyz"/>
<meta name="created" content="2023-04-29T03:25:30.761Z"/>
</head>
<Scene>
<Transform rotation="1 0 0 -1.5708">
<Shape>
<html>
<head>
<title>No caps</title>
<script type='text/javascript' src='https://www.x3dom.org/download/dev/x3dom-full.debug.js'> </script>
<link rel='stylesheet' type='text/css' href='https://www.x3dom.org/download/x3dom.css'></link>
<style type="text/css">
html,body{height:100%;margin:0;padding:0}
x3d{
width:100%;
height:100%;
@andreasplesch
andreasplesch / switchOrthoVP.xhtml
Last active February 24, 2023 05:03
Switch between orth. and persp. VPs
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Projection</title>
<!-- BEGIN:X3DOM -->
<script type="text/javascript" src="https://63f6668c66b9cc0008a93a14--x3dom.netlify.app/x3dom.debug.js"></script>
<link rel="stylesheet" type="text/css" href="https://63f6668c66b9cc0008a93a14--x3dom.netlify.app/x3dom.css" />
<style>
x3d, X3D { width: 500px }
<html>
<head>
<title>SIMPLE TRANSPARENCY ISSUE</title>
<script type='text/javascript' src='https://63ea5bdf9bdc170008f7b53e--x3dom.netlify.app/x3dom.debug.js'> </script>
<link rel='stylesheet' type='text/css' href='https://www.x3dom.org/download/x3dom.css'></link>
<style type="text/css">
html,body{height:100%;margin:0;padding:0}
x3d{
width:100%;
height:100%;