xrfragment-haxe/src/3rd/js/three/xrf/s.js

12 lines
327 B
JavaScript
Raw Normal View History

2024-02-08 19:40:43 +01:00
xrf.frag.suv = function(v, opts){
let { frag, mesh, model, camera, scene, renderer, THREE} = opts
if( !mesh.geometry ) return // nothing to do here
xrf.frag.uv.init(mesh)
mesh.suv.x = v.x
mesh.suv.y = v.y !== undefined ? v.y : v.x
mesh.suv.loop = v.loop === true ? true : false
xrf.frag.uv.scroll(mesh)
}