How to use the title.frag function in title

To help you get started, we’ve selected a few title examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github leon196 / leon196.github.io / Melimelo / js / ui.js View on Github external
THREE.Object3D.call(this);

	var titleTexture = textures['title'];
	var titleImage = titleTexture.image;

	var uniforms = {
		time: { value: 0 },
		resolution: { value: [window.innerWidth, window.innerHeight] },
		imageResolution: { value: [titleImage.width, titleImage.height] },
		target: { value: [0,1,0] },
		title: { value: titleTexture },
	};
	var material = new THREE.ShaderMaterial({
		vertexShader: shaders['title.vert'],
		fragmentShader: shaders['title.frag'],
		uniforms: uniforms,
		side: THREE.DoubleSide,
		transparent: true,
		depthTest: false,
	})

	this.title = new THREE.Mesh(new THREE.PlaneGeometry(1, 1), material);
	this.add(this.title);

	var subtitleTexture = textures['subtitle'];
	var subtitleImage = subtitleTexture.image;

	var uniforms = {
		time: { value: 0 },
		resolution: { value: [window.innerWidth, window.innerHeight] },
		imageResolution: { value: [subtitleImage.width, subtitleImage.height] },

title

Capitalize your titles properly

MIT
Latest version published 2 years ago

Package Health Score

56 / 100
Full package analysis