npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@tntv/layers

v1.1.7

Published

tntv effect layers use three.js

Downloads

14

Readme

TNTV-Layers

基于THREE.js实现的一套特效图层库,目前提供各种类型的flyline和points的图层,后续计划实现更多常用效果图层

使用方法

npm i @tntv/layers

引用

import {FlyLine} from '@tntv/layers';

demo

api

flyline

	//constructor() 构造函数 
	new FlyLine({
		addLineTimeout:100,// 线动画间隔
		materialConfig:{
			startColor:new THREE.Vector4(0,0,1,0), // 材质颜色
			endColor:new THREE.Vector4(0,1,1,1), // 材质结束颜色
		}
	})

	setData([{start:{x,y,z},end:{x,y,z}}]) //配置数据 
    start() //开始动画

flytube,flymesh

	new FlyTube({
		addLineTimeout:100,// 线动画间隔
		materialConfig:{
			lineWidth:5,
			useMap:true,
			map:texture,//材质
			//color:0xff00aa,
			repeat:new THREE.Vector2(20/5,1),//重复
			resolution:new THREE.Vector2(window.innerWidth,window.innerHeight)// 画布比例
		}
	})

	setData( [{start:{x,y,z},end:{x,y,z}}]) //配置数据
    start() //开始动画

MoveingLine

	new MoveingLine({
		speed:1,// 线动画间隔
		smoothNumber:1,//线顺滑度密度,最高为1
		materialConfig:{
			 flowSpeed:0.01 //流动速度
		}
	})

	setData([
		{
			color:"#0f9",
			points:[{x,y,z},{x,y,z}]
		}
	]) //配置数据

Points

	new Points({
		materialConfig:{
			size:2,
			map:textrue,//材质
			scale:100,//缩放比例,和相机和物体常用距离相关
		}
	})

	setData([
		{
			position:{x,y,z},// 坐标
			color:new THREE.Color(1,1,0) //颜色
		}
	]) //配置数据