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
let width = source_image_width; | |
let height = source_image_height; | |
let dpi = source_image_dpi; | |
// CONVERT PIXEL TO MM | |
let w = width / dpi * 2.54 * 10; | |
let h = height / dpi * 2.54 * 10; | |
// SCALE OBJECT | |
var box = new THREE.Box3().setFromObject( model ); |
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 color = "red"; | |
var per = 0.5; | |
var els = document.getElementsByClassName("u-s"); | |
for(let i = 0; i < els.length; i++){ | |
var height = els[i].offsetHeight; | |
var width = els[i].offsetWidth; | |
let underline = document.createElement('div'); | |
underline.style.width = width * per + "px"; | |
underline.style.height = 3 + "px"; |
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 cube; | |
var scene = new THREE.Scene(); | |
scene.background = new THREE.Color("rgb(120,120,120)"); | |
var camera = new THREE.PerspectiveCamera( 75, window.innerWidth/window.innerHeight, 0.1, 1000 ); | |
var renderer = new THREE.WebGLRenderer(); | |
renderer.setSize( window.innerWidth, window.innerHeight ); | |
document.body.appendChild( renderer.domElement ); |
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 dotGeometry = new THREE.Geometry(); | |
dotGeometry.vertices.push(RayOrigin); | |
var dotMaterial = new THREE.PointsMaterial({ | |
size: 10, | |
sizeAttenuation: false | |
}); | |
var dot = new THREE.Points(dotGeometry, dotMaterial); | |
scene.add(dot); |