diff --git a/package.json b/package.json index 0f0cd5a..a1ea1dd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "three.quarks", - "version": "0.12.3", + "version": "0.12.4", "description": "A General-Purpose Particle System for three.js", "type": "module", "types": "./dist/types/index.d.ts", diff --git a/src/index.ts b/src/index.ts index eae88fe..7250440 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,4 @@ -import registerShaderChunks from "./shaders/chunks/register-shader-chunks"; +import {registerShaderChunks} from './shaders'; export * from './ParticleEmitter'; export * from './Particle'; @@ -18,7 +18,8 @@ export * from './functions/'; export * from './behaviors/'; export * from './sequencers/'; export * from './nodes/'; +export * from './shaders/'; registerShaderChunks(); // remove this line if you have pro license -console.log('%c Particle system powered by three.quarks. https://quarks.art/', 'font-size: 16px; font-weight: bold;'); +console.log('%c Particle system powered by three.quarks. https://quarks.art/', 'font-size: 14px; font-weight: bold;'); diff --git a/src/shaders/chunks/index.ts b/src/shaders/chunks/index.ts new file mode 100644 index 0000000..02d6759 --- /dev/null +++ b/src/shaders/chunks/index.ts @@ -0,0 +1 @@ +export * from './register-shader-chunks'; diff --git a/src/shaders/chunks/register-shader-chunks.ts b/src/shaders/chunks/register-shader-chunks.ts index cac883f..d272460 100644 --- a/src/shaders/chunks/register-shader-chunks.ts +++ b/src/shaders/chunks/register-shader-chunks.ts @@ -1,27 +1,26 @@ -import { ShaderChunk as ShaderChunkReadOnly } from "three"; -import soft_fragment from "./soft_fragment.glsl"; -import soft_pars_fragment from "./soft_pars_fragment.glsl"; -import soft_pars_vertex from "./soft_pars_vertex.glsl"; -import soft_vertex from "./soft_vertex.glsl"; +import {ShaderChunk as ShaderChunkReadOnly} from 'three'; +import soft_fragment from './soft_fragment.glsl'; +import soft_pars_fragment from './soft_pars_fragment.glsl'; +import soft_pars_vertex from './soft_pars_vertex.glsl'; +import soft_vertex from './soft_vertex.glsl'; -import tile_fragment from "./tile_fragment.glsl"; -import tile_pars_fragment from "./tile_pars_fragment.glsl"; -import tile_pars_vertex from "./tile_pars_vertex.glsl"; -import tile_vertex from "./tile_vertex.glsl"; +import tile_fragment from './tile_fragment.glsl'; +import tile_pars_fragment from './tile_pars_fragment.glsl'; +import tile_pars_vertex from './tile_pars_vertex.glsl'; +import tile_vertex from './tile_vertex.glsl'; const ShaderChunk = ShaderChunkReadOnly as Record; -export default function registerShaderChunks() { - ShaderChunk["tile_pars_vertex"] = tile_pars_vertex; - ShaderChunk["tile_vertex"] = tile_vertex; +export function registerShaderChunks() { + ShaderChunk['tile_pars_vertex'] = tile_pars_vertex; + ShaderChunk['tile_vertex'] = tile_vertex; - ShaderChunk["tile_pars_fragment"] = tile_pars_fragment; - ShaderChunk["tile_fragment"] = tile_fragment; + ShaderChunk['tile_pars_fragment'] = tile_pars_fragment; + ShaderChunk['tile_fragment'] = tile_fragment; - ShaderChunk["soft_pars_vertex"] = soft_pars_vertex; - ShaderChunk["soft_vertex"] = soft_vertex; + ShaderChunk['soft_pars_vertex'] = soft_pars_vertex; + ShaderChunk['soft_vertex'] = soft_vertex; - ShaderChunk["soft_pars_fragment"] = soft_pars_fragment; - ShaderChunk["soft_fragment"] = soft_fragment; + ShaderChunk['soft_pars_fragment'] = soft_pars_fragment; + ShaderChunk['soft_fragment'] = soft_fragment; } - diff --git a/src/shaders/index.ts b/src/shaders/index.ts new file mode 100644 index 0000000..349bc48 --- /dev/null +++ b/src/shaders/index.ts @@ -0,0 +1 @@ +export * from './chunks';