Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

threejs heart

const shape = new THREE.Shape();
const x = -2.5;
const y = -5;
shape.moveTo(x + 2.5, y + 2.5);
shape.bezierCurveTo(x + 2.5, y + 2.5, x + 2, y, x, y);
shape.bezierCurveTo(x - 3, y, x - 3, y + 3.5, x - 3, y + 3.5);
shape.bezierCurveTo(x - 3, y + 5.5, x - 1.5, y + 7.7, x + 2.5, y + 9.5);
shape.bezierCurveTo(x + 6, y + 7.7, x + 8, y + 4.5, x + 8, y + 3.5);
shape.bezierCurveTo(x + 8, y + 3.5, x + 8, y, x + 5, y);
shape.bezierCurveTo(x + 3.5, y, x + 2.5, y + 2.5, x + 2.5, y + 2.5);
const curveSegments = 5;  
const geometry = new THREE.ShapeGeometry(shape, curveSegments);
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript create a multidimensional array 
Javascript :: register service worker 
Javascript :: react hooks in codepen 
Javascript :: image load fail event html 
Javascript :: Using a decrementing For Loop to Reverse an Array 
Javascript :: yup test string async 
Javascript :: javascript Use clearTimeout() Method 
Javascript :: check if all array elements are equal 
Javascript :: compare if strings are equal javascript 
Javascript :: delete value from json array with index 
Javascript :: Kendo grid Excel export with filter 
Javascript :: regex for fullstop 
Javascript :: Monitor in production node js 
Javascript :: call dynamic var name javascript 
Javascript :: objeto con método javascript 
Javascript :: dayofmonth mongodb 
Javascript :: ajax 
Javascript :: enable emmet in vscode for jsx 
Javascript :: object method in javascript 
Javascript :: react state not updating immediately 
Javascript :: calculate time in seconds javascript angular 
Javascript :: head first javascript programming 
Javascript :: how to inspect element attributes in cypress 
Javascript :: js similar jquery document ready 
Javascript :: js remove english word from string 
Javascript :: getSheetByName 
Javascript :: javascript event loop 
Javascript :: socket io add timeout 
Javascript :: set function to execute at certain time js 
Javascript :: comments in js 
ADD CONTENT
Topic
Content
Source link
Name
3+7 =