index int64 0 0 | repo_id stringlengths 16 181 | file_path stringlengths 28 270 | content stringlengths 1 11.6M | __index_level_0__ int64 0 10k |
|---|---|---|---|---|
0 | petrpan-code/tsparticles/tsparticles/shapes | petrpan-code/tsparticles/tsparticles/shapes/cards/LICENSE | MIT License
Copyright (c) 2020 Matteo Bruni
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, dist... | 4,300 |
0 | petrpan-code/tsparticles/tsparticles/shapes | petrpan-code/tsparticles/tsparticles/shapes/cards/README.md | [](https://particles.js.org)
# tsParticles Cards Shape
[](https://www.jsdelivr.com/package/npm/tsparticles-shape-cards)
[;
const version = require("./package.json").version;
module.exports = loadParticlesShape({ moduleName: "cards", shapeName: "Cards", version, dir: __dirname });
| 4,311 |
0 | petrpan-code/tsparticles/tsparticles/shapes/cards | petrpan-code/tsparticles/tsparticles/shapes/cards/src/CardsSuitsDrawers.ts | import type { IParticle, IShapeDrawer } from "tsparticles-engine";
import { drawPath, paths } from "./Utils";
export class SpadeDrawer implements IShapeDrawer {
draw(context: CanvasRenderingContext2D, _particle: IParticle, radius: number): void {
drawPath(context, radius, paths.spade);
}
}
export clas... | 4,312 |
0 | petrpan-code/tsparticles/tsparticles/shapes/cards | petrpan-code/tsparticles/tsparticles/shapes/cards/src/ICardsPath.ts | import type { ICoordinates } from "tsparticles-engine";
export interface IPathSegment {
values: ICoordinates[];
}
export interface IPath {
segments: IPathSegment[];
}
export interface ICardsPath {
readonly club: IPath;
readonly diamond: IPath;
readonly heart: IPath;
readonly spade: IPath;
}
| 4,313 |
0 | petrpan-code/tsparticles/tsparticles/shapes/cards | petrpan-code/tsparticles/tsparticles/shapes/cards/src/Utils.ts | import type { ICardsPath, IPath } from "./ICardsPath";
/**
* @param ctx
* @param radius
* @param path
*/
export function drawPath(ctx: CanvasRenderingContext2D, radius: number, path: IPath): void {
if (!path.segments.length || !path.segments[0].values.length) {
return;
}
ctx.moveTo(path.segmen... | 4,314 |
0 | petrpan-code/tsparticles/tsparticles/shapes/cards | petrpan-code/tsparticles/tsparticles/shapes/cards/src/index.ts | import { ClubDrawer, DiamondDrawer, HeartDrawer, SpadeDrawer } from "./CardsSuitsDrawers";
import type { Engine } from "tsparticles-engine";
/**
* @param engine -
* @param refresh -
*/
export async function loadCardsShape(engine: Engine, refresh = true): Promise<void> {
await engine.addShape(["spade", "spades"]... | 4,315 |
0 | petrpan-code/tsparticles/tsparticles/shapes | petrpan-code/tsparticles/tsparticles/shapes/circle/.browserslistrc | since 2019
not dead
| 4,316 |
0 | petrpan-code/tsparticles/tsparticles/shapes | petrpan-code/tsparticles/tsparticles/shapes/circle/.eslintignore | dist
node_modules | 4,317 |
0 | petrpan-code/tsparticles/tsparticles/shapes | petrpan-code/tsparticles/tsparticles/shapes/circle/.eslintrc.js | module.exports = {
extends: [
"@tsparticles/eslint-config",
]
};
| 4,318 |
0 | petrpan-code/tsparticles/tsparticles/shapes | petrpan-code/tsparticles/tsparticles/shapes/circle/CHANGELOG.md | # Change Log
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [2.12.0](https://github.com/matteobruni/tsparticles/compare/v2.11.1...v2.12.0) (2023-08-03)
**Note:** Version bump only for package tsparticles-shape-... | 4,319 |
0 | petrpan-code/tsparticles/tsparticles/shapes | petrpan-code/tsparticles/tsparticles/shapes/circle/LICENSE | MIT License
Copyright (c) 2020 Matteo Bruni
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, dist... | 4,320 |
0 | petrpan-code/tsparticles/tsparticles/shapes | petrpan-code/tsparticles/tsparticles/shapes/circle/README.md | [](https://particles.js.org)
# tsParticles Circle Shape
[](https://www.jsdelivr.com/package/npm/tsparticles-shape-circle)
[;
const version = require("./package.json").version;
module.exports = loadParticlesShape({ moduleName: "circle", shapeName: "Circle", version, dir: __dirname });
| 4,331 |
0 | petrpan-code/tsparticles/tsparticles/shapes/circle | petrpan-code/tsparticles/tsparticles/shapes/circle/src/CircleDrawer.ts | import { type Container, type IShapeDrawer, isObject } from "tsparticles-engine";
import type { CircleParticle } from "./CircleParticle";
import type { ICircleShapeData } from "./ICircleShapeData";
/**
*/
export class CircleDrawer implements IShapeDrawer {
draw(context: CanvasRenderingContext2D, particle: CircleP... | 4,332 |
0 | petrpan-code/tsparticles/tsparticles/shapes/circle | petrpan-code/tsparticles/tsparticles/shapes/circle/src/CircleParticle.ts | import type { IRangeValue, Particle } from "tsparticles-engine";
export type CircleParticle = Particle & {
circleRange?: IRangeValue;
};
| 4,333 |
0 | petrpan-code/tsparticles/tsparticles/shapes/circle | petrpan-code/tsparticles/tsparticles/shapes/circle/src/ICircleShapeData.ts | import type { IShapeValues, RangeValue } from "tsparticles-engine";
export interface ICircleShapeData extends IShapeValues {
angle: RangeValue;
}
| 4,334 |
0 | petrpan-code/tsparticles/tsparticles/shapes/circle | petrpan-code/tsparticles/tsparticles/shapes/circle/src/index.ts | import { CircleDrawer } from "./CircleDrawer";
import type { Engine } from "tsparticles-engine";
/**
* @param engine -
* @param refresh -
*/
export async function loadCircleShape(engine: Engine, refresh = true): Promise<void> {
await engine.addShape("circle", new CircleDrawer(), refresh);
}
| 4,335 |
0 | petrpan-code/tsparticles/tsparticles/shapes | petrpan-code/tsparticles/tsparticles/shapes/cog/.browserslistrc | since 2019
not dead
| 4,336 |
0 | petrpan-code/tsparticles/tsparticles/shapes | petrpan-code/tsparticles/tsparticles/shapes/cog/.eslintignore | dist
node_modules | 4,337 |
0 | petrpan-code/tsparticles/tsparticles/shapes | petrpan-code/tsparticles/tsparticles/shapes/cog/.eslintrc.js | module.exports = {
extends: [
"@tsparticles/eslint-config",
]
};
| 4,338 |
0 | petrpan-code/tsparticles/tsparticles/shapes | petrpan-code/tsparticles/tsparticles/shapes/cog/CHANGELOG.md | # Change Log
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [2.12.0](https://github.com/matteobruni/tsparticles/compare/v2.11.1...v2.12.0) (2023-08-03)
**Note:** Version bump only for package tsparticles-shape-... | 4,339 |
0 | petrpan-code/tsparticles/tsparticles/shapes | petrpan-code/tsparticles/tsparticles/shapes/cog/LICENSE | MIT License
Copyright (c) 2020 Matteo Bruni
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, dist... | 4,340 |
0 | petrpan-code/tsparticles/tsparticles/shapes | petrpan-code/tsparticles/tsparticles/shapes/cog/README.md | [](https://particles.js.org)
# tsParticles Cog Shape
[](https://www.jsdelivr.com/package/npm/tsparticles-shape-cog)
[](http... | 4,341 |
0 | petrpan-code/tsparticles/tsparticles/shapes | petrpan-code/tsparticles/tsparticles/shapes/cog/package.dist.json | {
"name": "tsparticles-shape-cog",
"version": "2.12.0",
"description": "tsParticles cog shape",
"homepage": "https://particles.js.org",
"repository": {
"type": "git",
"url": "git+https://github.com/matteobruni/tsparticles.git",
"directory": "shapes/cog"
},
"keywords": [
"front-end",
"f... | 4,342 |
0 | petrpan-code/tsparticles/tsparticles/shapes | petrpan-code/tsparticles/tsparticles/shapes/cog/package.json | {
"name": "tsparticles-shape-cog",
"version": "2.12.0",
"description": "tsParticles cog shape",
"homepage": "https://particles.js.org",
"scripts": {
"build": "tsparticles-cli build",
"build:ci": "tsparticles-cli build --ci",
"version": "tsparticles-cli build -d && git add package.dist.json",
"... | 4,343 |
0 | petrpan-code/tsparticles/tsparticles/shapes | petrpan-code/tsparticles/tsparticles/shapes/cog/tsconfig.base.json | {
"extends": "@tsparticles/tsconfig/tsconfig.base.json",
"compilerOptions": {
"rootDir": "./src"
},
"include": [
"./src"
]
}
| 4,344 |
0 | petrpan-code/tsparticles/tsparticles/shapes | petrpan-code/tsparticles/tsparticles/shapes/cog/tsconfig.browser.json | {
"extends": ["./tsconfig.base.json", "@tsparticles/tsconfig/tsconfig.browser.json"],
"compilerOptions": {
"outDir": "./dist/browser"
}
}
| 4,345 |
0 | petrpan-code/tsparticles/tsparticles/shapes | petrpan-code/tsparticles/tsparticles/shapes/cog/tsconfig.json | {
"extends": ["./tsconfig.base.json", "@tsparticles/tsconfig/tsconfig.json"],
"compilerOptions": {
"outDir": "./dist/cjs"
}
}
| 4,346 |
0 | petrpan-code/tsparticles/tsparticles/shapes | petrpan-code/tsparticles/tsparticles/shapes/cog/tsconfig.module.json | {
"extends": ["./tsconfig.base.json", "@tsparticles/tsconfig/tsconfig.module.json"],
"compilerOptions": {
"outDir": "./dist/esm"
}
}
| 4,347 |
0 | petrpan-code/tsparticles/tsparticles/shapes | petrpan-code/tsparticles/tsparticles/shapes/cog/tsconfig.types.json | {
"extends": ["./tsconfig.base.json", "@tsparticles/tsconfig/tsconfig.types.json"],
"compilerOptions": {
"outDir": "./dist/types"
}
}
| 4,348 |
0 | petrpan-code/tsparticles/tsparticles/shapes | petrpan-code/tsparticles/tsparticles/shapes/cog/tsconfig.umd.json | {
"extends": ["./tsconfig.base.json", "@tsparticles/tsconfig/tsconfig.umd.json"],
"compilerOptions": {
"outDir": "./dist/umd"
}
}
| 4,349 |
0 | petrpan-code/tsparticles/tsparticles/shapes | petrpan-code/tsparticles/tsparticles/shapes/cog/typedoc.json | {
"includes": "./markdown",
"entryPoints": [
"./src/"
],
"entryPointStrategy": "expand",
"name": "tsParticles Cog Shape",
"includeVersion": true,
"hideGenerator": true,
"out": "./docs",
"validation": {
"invalidLink": true,
"notDocumented": true
}
}
| 4,350 |
0 | petrpan-code/tsparticles/tsparticles/shapes | petrpan-code/tsparticles/tsparticles/shapes/cog/webpack.config.js | const { loadParticlesShape } = require("@tsparticles/webpack-plugin");
const version = require("./package.json").version;
module.exports = loadParticlesShape({ moduleName: "cog", shapeName: "Cog", version, dir: __dirname });
| 4,351 |
0 | petrpan-code/tsparticles/tsparticles/shapes/cog | petrpan-code/tsparticles/tsparticles/shapes/cog/src/CogDrawer.ts | import { type Container, type IShapeDrawer, getRangeValue } from "tsparticles-engine";
import type { CogParticle } from "./CogParticle";
import type { ICogData } from "./ICogData";
export class CogDrawer implements IShapeDrawer {
afterEffect(ctx: CanvasRenderingContext2D, particle: CogParticle, radius: number): vo... | 4,352 |
0 | petrpan-code/tsparticles/tsparticles/shapes/cog | petrpan-code/tsparticles/tsparticles/shapes/cog/src/CogParticle.ts | import type { Particle } from "tsparticles-engine";
export type CogParticle = Particle & {
cogHoleRadius?: number;
cogInnerRadius?: number;
cogInnerTaper?: number;
cogNotches?: number;
cogOuterTaper?: number;
};
| 4,353 |
0 | petrpan-code/tsparticles/tsparticles/shapes/cog | petrpan-code/tsparticles/tsparticles/shapes/cog/src/ICogData.ts | import type { IShapeValues, RangeValue } from "tsparticles-engine";
export interface ICogData extends IShapeValues {
holeRadius?: RangeValue;
innerRadius?: RangeValue;
innerTaper?: RangeValue;
notches?: RangeValue;
outerTaper?: RangeValue;
}
| 4,354 |
0 | petrpan-code/tsparticles/tsparticles/shapes/cog | petrpan-code/tsparticles/tsparticles/shapes/cog/src/index.ts | import { CogDrawer } from "./CogDrawer";
import type { Engine } from "tsparticles-engine";
/**
* @param engine -
* @param refresh -
*/
export async function loadCogShape(engine: Engine, refresh = true): Promise<void> {
await engine.addShape("cog", new CogDrawer(), refresh);
}
| 4,355 |
0 | petrpan-code/tsparticles/tsparticles/shapes | petrpan-code/tsparticles/tsparticles/shapes/heart/.browserslistrc | since 2019
not dead
| 4,356 |
0 | petrpan-code/tsparticles/tsparticles/shapes | petrpan-code/tsparticles/tsparticles/shapes/heart/.eslintignore | dist
node_modules | 4,357 |
0 | petrpan-code/tsparticles/tsparticles/shapes | petrpan-code/tsparticles/tsparticles/shapes/heart/.eslintrc.js | module.exports = {
extends: [
"@tsparticles/eslint-config",
]
};
| 4,358 |
0 | petrpan-code/tsparticles/tsparticles/shapes | petrpan-code/tsparticles/tsparticles/shapes/heart/CHANGELOG.md | # Change Log
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [2.12.0](https://github.com/matteobruni/tsparticles/compare/v2.11.1...v2.12.0) (2023-08-03)
**Note:** Version bump only for package tsparticles-shape-... | 4,359 |
0 | petrpan-code/tsparticles/tsparticles/shapes | petrpan-code/tsparticles/tsparticles/shapes/heart/LICENSE | MIT License
Copyright (c) 2020 Matteo Bruni
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, dist... | 4,360 |
0 | petrpan-code/tsparticles/tsparticles/shapes | petrpan-code/tsparticles/tsparticles/shapes/heart/README.md | [](https://particles.js.org)
# tsParticles Heart Shape
[](https://www.jsdelivr.com/package/npm/tsparticles-shape-heart)
[;
const version = require("./package.json").version;
module.exports = loadParticlesShape({ moduleName: "heart", shapeName: "Heart", version, dir: __dirname });
| 4,371 |
0 | petrpan-code/tsparticles/tsparticles/shapes/heart | petrpan-code/tsparticles/tsparticles/shapes/heart/src/HeartDrawer.ts | import type { IParticle, IShapeDrawer } from "tsparticles-engine";
export class HeartDrawer implements IShapeDrawer {
draw(context: CanvasRenderingContext2D, _particle: IParticle, radius: number): void {
const x = -radius,
y = -radius;
context.moveTo(x, y + radius / 2);
context... | 4,372 |
0 | petrpan-code/tsparticles/tsparticles/shapes/heart | petrpan-code/tsparticles/tsparticles/shapes/heart/src/index.ts | import type { Engine } from "tsparticles-engine";
import { HeartDrawer } from "./HeartDrawer";
/**
* @param engine -
* @param refresh -
*/
export async function loadHeartShape(engine: Engine, refresh = true): Promise<void> {
await engine.addShape("heart", new HeartDrawer(), refresh);
}
| 4,373 |
0 | petrpan-code/tsparticles/tsparticles/shapes | petrpan-code/tsparticles/tsparticles/shapes/image/.browserslistrc | since 2019
not dead
| 4,374 |
0 | petrpan-code/tsparticles/tsparticles/shapes | petrpan-code/tsparticles/tsparticles/shapes/image/.eslintignore | dist
node_modules | 4,375 |
0 | petrpan-code/tsparticles/tsparticles/shapes | petrpan-code/tsparticles/tsparticles/shapes/image/.eslintrc.js | module.exports = {
extends: [
"@tsparticles/eslint-config",
]
};
| 4,376 |
0 | petrpan-code/tsparticles/tsparticles/shapes | petrpan-code/tsparticles/tsparticles/shapes/image/CHANGELOG.md | # Change Log
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [2.12.0](https://github.com/matteobruni/tsparticles/compare/v2.11.1...v2.12.0) (2023-08-03)
**Note:** Version bump only for package tsparticles-shape-... | 4,377 |
0 | petrpan-code/tsparticles/tsparticles/shapes | petrpan-code/tsparticles/tsparticles/shapes/image/LICENSE | MIT License
Copyright (c) 2020 Matteo Bruni
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, dist... | 4,378 |
0 | petrpan-code/tsparticles/tsparticles/shapes | petrpan-code/tsparticles/tsparticles/shapes/image/README.md | [](https://particles.js.org)
# tsParticles Image Shape
[](https://www.jsdelivr.com/package/npm/tsparticles-shape-image)
[;
const version = require("./package.json").version;
module.exports = loadParticlesShape({ moduleName: "image", shapeName: "Image", version, dir: __dirname });
| 4,389 |
0 | petrpan-code/tsparticles/tsparticles/shapes/image | petrpan-code/tsparticles/tsparticles/shapes/image/src/IImageShape.ts | import type { IShapeValues } from "tsparticles-engine";
export interface IImageShape extends IShapeValues {
gif: boolean;
height: number;
name: string;
replaceColor: boolean;
/*
@deprecated use replaceColor instead
*/
replace_color: boolean;
src: string;
width: number;
}
| 4,390 |
0 | petrpan-code/tsparticles/tsparticles/shapes/image | petrpan-code/tsparticles/tsparticles/shapes/image/src/ImageDrawer.ts | import { type Container, type IDelta, type IShapeDrawer, errorPrefix } from "tsparticles-engine";
import type { IImage, IParticleImage, ImageParticle } from "./Utils";
import type { ImageContainer, ImageEngine } from "./types";
import { DisposalMethod } from "./GifUtils/Enums/DisposalMethod";
import type { IImageShape ... | 4,391 |
0 | petrpan-code/tsparticles/tsparticles/shapes/image | petrpan-code/tsparticles/tsparticles/shapes/image/src/ImagePreloader.ts | import type { Engine, IContainerPlugin, IPlugin, RecursivePartial } from "tsparticles-engine";
import type { IPreloadOptions, PreloadOptions } from "./types";
import { Preload } from "./Options/Classes/Preload";
export class ImagePreloaderPlugin implements IPlugin {
readonly id;
private readonly _engine;
... | 4,392 |
0 | petrpan-code/tsparticles/tsparticles/shapes/image | petrpan-code/tsparticles/tsparticles/shapes/image/src/Utils.ts | import { type IHsl, type Particle, errorPrefix, getLogger, getStyleFromHsl } from "tsparticles-engine";
import { decodeGIF, getGIFLoopAmount } from "./GifUtils/Utils";
import type { GIF } from "./GifUtils/Types/GIF";
import type { IImageShape } from "./IImageShape";
/**
*/
/**
* The image interface, used for keepin... | 4,393 |
0 | petrpan-code/tsparticles/tsparticles/shapes/image | petrpan-code/tsparticles/tsparticles/shapes/image/src/index.ts | import { downloadSvgImage, loadGifImage, loadImage } from "./Utils";
import type { IImage } from "./Utils";
import type { IPreload } from "./Options/Interfaces/IPreload";
import { ImageDrawer } from "./ImageDrawer";
import type { ImageEngine } from "./types";
import { ImagePreloaderPlugin } from "./ImagePreloader";
imp... | 4,394 |
0 | petrpan-code/tsparticles/tsparticles/shapes/image | petrpan-code/tsparticles/tsparticles/shapes/image/src/types.ts | import type { Container, Engine, IOptions, Options } from "tsparticles-engine";
import type { IImage } from "./Utils";
import type { IPreload } from "./Options/Interfaces/IPreload";
import type { Preload } from "./Options/Classes/Preload";
export type ImageEngine = Engine & {
images?: IImage[];
loadImage?: (d... | 4,395 |
0 | petrpan-code/tsparticles/tsparticles/shapes/image/src | petrpan-code/tsparticles/tsparticles/shapes/image/src/GifUtils/ByteStream.ts | export class ByteStream {
/**
* this streams raw data
*/
data: Uint8ClampedArray;
/**
* current position in `data`
*/
pos: number;
constructor(bytes: Uint8ClampedArray) {
this.pos = 0;
this.data = new Uint8ClampedArray(bytes);
}
/**
* returns a str... | 4,396 |
0 | petrpan-code/tsparticles/tsparticles/shapes/image/src | petrpan-code/tsparticles/tsparticles/shapes/image/src/GifUtils/Constants.ts | export const InterlaceOffsets = [0, 4, 2, 1];
export const InterlaceSteps = [8, 8, 4, 2];
| 4,397 |
0 | petrpan-code/tsparticles/tsparticles/shapes/image/src | petrpan-code/tsparticles/tsparticles/shapes/image/src/GifUtils/Utils.ts | import type { IRgb, IRgba } from "tsparticles-engine";
import { InterlaceOffsets, InterlaceSteps } from "./Constants";
import type { ApplicationExtension } from "./Types/ApplicationExtension";
import { ByteStream } from "./ByteStream";
import { DisposalMethod } from "./Enums/DisposalMethod.js";
import type { GIF } from... | 4,398 |
0 | petrpan-code/tsparticles/tsparticles/shapes/image/src/GifUtils | petrpan-code/tsparticles/tsparticles/shapes/image/src/GifUtils/Enums/DisposalMethod.ts | export const enum DisposalMethod {
/**
* unspecified > replaces entire frame
*/
Replace,
/**
* do not dispose > combine with previous frame
*/
Combine,
/**
* restore to background > combine with first frame (background)
*/
RestoreBackground,
/**
... | 4,399 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.