This file contains hidden or 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
Util = | |
calculate_resize: (image_width, image_height, win_width, win_height) -> | |
window_ratio = win_width / win_height | |
image_ratio1 = image_width / image_height | |
image_ratio2 = image_height / image_width | |
if window_ratio < image_ratio1 | |
This file contains hidden or 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 fs = require('fs'); | |
require('shelljs/global'); | |
const EXAMPLES_DIR = './node_modules/three/examples/js' | |
const DEST_DIR = './src/js/lib/three/examples' | |
mkdir('-p', DEST_DIR); | |
const files = [ | |
`${EXAMPLES_DIR}/loaders/GLTFLoader.js`, |
This file contains hidden or 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
import pymel.core as pm | |
# Set the animation playback range | |
pm.playbackOptions(animationEndTime = 500, maxTime = 500, loop = 'once') | |
# Create sphere container which will act as the collider for the particles | |
sphere = pm.polySphere(r = 15, subdivisionsX = 32, subdivisionsY = 32) |
This file contains hidden or 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
""" | |
D sculpture | |
""" | |
import pymel.core as pm | |
import random | |
from pointset import * | |
sets = 2 | |
points = [ ] |
This file contains hidden or 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
from forms.geometry import hexahedron | |
holes = [ 7, 11, 12, 13, 17, 27, 32, 35, 36, 37, 38, 39, 42, 47, 51, 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 71, 72, 73, 77, 81, 82, 83, 85, 86, 87, 88, 89, 91, 92, 93, 97, 107, 111, 112, 113, 117 ] | |
x = hexahedron.Sierpinski().generate( size = 40, iterations = 2, grid = 5, holes = holes ) |