- Polygon Cutting : https://x.com/SketchpunkLabs/status/1669338619226607616
- 3D Extrusion along curve : https://x.com/SketchpunkLabs/status/1425949400795385860
- Working out GiftWrapping Algo : https://x.com/SketchpunkLabs/status/1707021698703163473
- Working out Bisector Cutting Polygons : https://x.com/SketchpunkLabs/status/1665944909675651077
- Cutting & 3D Extrude Polygon :
- Working out porting blender's mesh data structure & operations to javascript/webgl
- https://x.com/SketchpunkLabs/status/1715404652584349774
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
| /* | |
| const ubo = new Ubo([ | |
| { name:'time', type:GTYPE.f32, init:22 }, | |
| { name:'num', type:GTYPE.f32, init:100 }, | |
| { name:'vec', type:GTYPE.vec3, init:[1,2,3] }, | |
| ]); | |
| ubo.time = 999; | |
| ubo.vec = [5,6,7]; |
Find & Pick an opensource project that provides same or similar features to shopify. Learn the method of how to self host which ever solution is picked. Be it regular web hosting or some sort of docker hosting.
Some of these projects also provide a hosting service. They just setup a server with the project preconfigured & ready for use. At that point you are on your own on how use the web app, they will only handle the hosting side of things. This might be a good option as long as its a good hosting service.
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
| // let [clips, aSkel, aGrp] = await loadAnimations( `${url}/anim/source-animation.glb` ); | |
| // let aHelper = new THREE.SkeletonHelper( aSkel.bones[0] ); | |
| // App.scene.add( aGrp || aSkel.bones[0], aHelper ); | |
| // const mixer = new THREE.AnimationMixer( new THREE.Object3D() ); | |
| // const action = this.mixer.clipAction( clips[0], aSkel.bones[0] ); | |
| // action.play(); | |
| async function loadAnimations( url ){ | |
| const tf = await new GLTFLoader().loadAsync( url ); |
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
| // new HotKeys().reg( 'ctrl+s', e=>console.log( 'woot' ) ); | |
| export default class HotKeys{ | |
| items = []; | |
| constructor(){ window.addEventListener( 'keydown', this.onKeyDown ); } | |
| dispose(){ window.removeEventListener( 'keydown', this.onKeyDown ); } | |
| reg( str, fn ){ | |
| // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
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 * as THREE from 'three'; | |
| export default class SkyGradientMaterial extends THREE.RawShaderMaterial { | |
| static createBox(scl = 1): THREE.Mesh { | |
| const geo = new THREE.BoxGeometry(2, 2, 2); | |
| const mesh = new THREE.Mesh(geo, new SkyGradientMaterial()); | |
| mesh.scale.setScalar(scl); | |
| return mesh; | |
| } |
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
| function downloadText(fName: string, txt: string) { | |
| const blob = new Blob([txt], { type: 'text/plain;charset=utf-8;' }); | |
| const url = window.URL.createObjectURL(blob); | |
| const link = document.createElement('a'); | |
| link.href = url; | |
| link.download = fName; | |
| link.target = '_blank'; | |
| // link.click(); | |
| link.dispatchEvent(new MouseEvent('click')); |
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 * as THREE from 'three'; | |
| class CustomMaterial extends THREE.RawShaderMaterial { | |
| constructor( props={} ){ | |
| super(); | |
| // Merge custom props with default options | |
| const opts = Object.assign( | |
| { | |
| offset : [ 0, 1, 0 ], |
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
| // Clone an event then dispatch it to an HTML Element | |
| function dispatchClonedEvent( e: Event, elm:HTMLElement ){ | |
| if( e.type.startsWith( 'pointer' ) ){ | |
| const evt = e as PointerEvent; | |
| elm.dispatchEvent( new PointerEvent( evt.type, { | |
| bubbles : evt.bubbles, | |
| cancelable : evt.cancelable, | |
| clientX : evt.clientX, | |
| clientY : evt.clientY, | |
| button : evt.button, |
NewerOlder