Skip to content

Instantly share code, notes, and snippets.

View xeolabs's full-sized avatar
🏋️‍♂️
Developing http://xeokit.io

xeolabs xeolabs

🏋️‍♂️
Developing http://xeokit.io
View GitHub Profile
@mtveerman
mtveerman / IFC4_individual_properties.json
Created February 11, 2019 16:07
IFC4 Individual Properties as JSON
[{"name":"a", "propertyType":"P_SINGLEVALUE","type":"IfcPositiveLengthMeasure","psets":["Pset_FastenerWeld"]},
{"name":"AboveGround", "propertyType":"P_SINGLEVALUE","type":"IfcLogical","psets":["Pset_BuildingStoreyCommon"]},
{"name":"AccessCoverLoadRating", "propertyType":"P_SINGLEVALUE","type":"IfcText","psets":["Pset_DistributionChamberElementTypeFormedDuct", "Pset_DistributionChamberElementTypeInspectionChamber", "Pset_DistributionChamberElementTypeManhole"]},
{"name":"AccessCoverMaterial", "propertyType":"P_REFERENCEVALUE","type":"IfcMaterialDefinition","psets":["Pset_DistributionChamberElementTypeInspectionChamber", "Pset_DistributionChamberElementTypeManhole", "Pset_DistributionChamberElementTypeMeterChamber", "Pset_DistributionChamberElementTypeValveChamber"]},
{"name":"AccessLengthOrRadius", "propertyType":"P_SINGLEVALUE","type":"IfcPositiveLengthMeasure","psets":["Pset_DistributionChamberElementTypeInspectionChamber", "Pset_DistributionChamberElementTypeManhole"]},
{"name":"AccessType", "propertyType
@sketchpunk
sketchpunk / quaternion.glsl
Created September 3, 2018 14:31
Quaternion Vector Rotation in GLSL
vec3 vecQuatRotation(vec4 q, vec3 v){
return v + cross(2.0 * q.xyz, cross(q.xyz, v) + q.w * v);
}
@TimvanScherpenzeel
TimvanScherpenzeel / support-table-webgl1-webgl2.md
Created April 5, 2018 07:52
Support table - WebGL & WebGL2 support
Device OS OS version Browser Browser version WebGL WebGL2
Apple iPad 5th iOS 11.0.3 Mobile Safari 11.0 X
Apple iPad Air 2 iOS 8.4 Mobile Safari 8.0 X
Apple iPad Mini 3 iOS 8.1.2 Mobile Safari 8.0 X
Apple iPad Pro iOS 11.2.1 Mobile Safari 11.0 X
Apple iPhone 5S iOS 8.1.3 Mobile Safari 8.0 X
Apple iPhone 6 Plus iOS 8.1 Mobile Safari 8.0 X
Apple iPhone 6 iOS 8.1.3 Mobile Safari 8.0 X
Apple iPhone 6S Plus iOS 9.0.1 Mobile Safari 9.0 X
@iandanforth
iandanforth / canvascapture.md
Last active October 5, 2022 10:57
Capture WebGL frames to disk

How to capture WebGL/Canvas by piping data over a websocket.

This Gist builds on https://gist.github.com/unconed/4370822 from @unconed.

Instead of the original method which writes to the browsers sandboxed filesystem here we use a websocket connection provided by websocketd to pipe image data to a short python script that writes out the .png files to disk.

Install websocketd

@pavelvasev
pavelvasev / a.js
Created January 7, 2015 11:16
scenejs setIndices setPrimitive
SceneJS.Geometry.prototype.setIndices = function (data) {
if (data.indices && this._core.indexBuf) {
this._boundary = null;
var core = this._core;
core.indexBuf.bind();
core.indexBuf.setData(new Uint16Array(data.indices), data.indicesOffset || 0 );
core.arrays.indices.set(data.indices, data.indicesOffset || 0 );
this._engine.display.imageDirty = true;
}
};
@xeolabs
xeolabs / scenejs-intro-example-v0.7.6.html
Created July 18, 2010 09:33
SceneJS 7.6 Intro Example
<!-- Airplane model -->
<script src="models/airplane.js" type="text/javascript"><script/>
<canvas id="theCanvas" width: 900 height: 900><script/>
<script type="text/javascript">
/* Scene definition
*/