How to use the Uniform function from three
Find comprehensive JavaScript three.Uniform code examples handpicked from public code repositorys.
GitHub: avin/generative
46 47 48 49 50 51 52 53 54 55
function createGlassMaterial() { return new THREE.ShaderMaterial({ uniforms: { iTime: { value: 0.0 }, iResolution: new THREE.Uniform(new THREE.Vector2(100, 100)), }, fragmentShader: glassFragmentShader, vertexShader: generalVertexShader,
9
77
5
+ 17 other calls in file
GitHub: star8ks/sketch
31 32 33 34 35 36 37 38 39 40
vertexShader: glslify('./vert.glsl'), fragmentShader: glslify('./cloud.frag.glsl'), uniforms: { uResolution: new THREE.Uniform(new THREE.Vector2(app.engine.deviceWidth, app.engine.deviceHeight)), uTime: { type: "f", value: 0 }, uMouse: new THREE.Uniform(new THREE.Vector2(0, 0)), uScale: { type: "f", value: 1.0 }, uTextureOffset: new THREE.Uniform(new THREE.Vector2(0, 0)), uMorphAmount: { type: "f", value: 0.0 }, // uRandomSeed: { type: "f", value: randomSeed },
1
1
1
+ 377 other calls in file
GitHub: star8ks/sketch
56 57 58 59 60 61 62 63 64 65
uGrabCenter: new THREE.Uniform(new THREE.Vector3(0, 0, 0)), uTarget: new THREE.Uniform(new THREE.Vector3(0, 0, 0)), // uMousePosition: new THREE.Uniform(new THREE.Vector2(0, 0)), uTime: { type: 'f', value: 0 }, uGrabStart: new THREE.Uniform(0.0), uReleaseStart: new THREE.Uniform(0.0), // uResolution: new THREE.Uniform(new THREE.Vector2( // app.renderer.domElement.clientWidth, // app.renderer.domElement.clientHeight // )),
1
1
0
+ 15 other calls in file
three.Vector3 is the most popular function in three (22341 examples)