All Projects → PavelLaptev → squircle-houdini-css

PavelLaptev / squircle-houdini-css

Licence: MIT license
A tiny CSS Houdini module that allows to add a squircle shape to HTML elements

Programming Languages

javascript
184084 projects - #8 most used programming language
SCSS
7915 projects
HTML
75241 projects

Projects that are alternatives of or similar to squircle-houdini-css

smooth-corners
CSS superellipse masks using the Houdini API
Stars: ✭ 133 (+27.88%)
Mutual labels:  houdini, squircle
meshlab-in-houdini
Bringing MeshLab functionality into Houdini
Stars: ✭ 33 (-68.27%)
Mutual labels:  houdini
texture-synthesis-houdini
🎨 Houdini / PDG Plugin for Embark Studios' Example-based texture synthesis
Stars: ✭ 91 (-12.5%)
Mutual labels:  houdini
All In One
有关All In One 的houdini实现道路
Stars: ✭ 41 (-60.58%)
Mutual labels:  houdini
AnimationDNA
Maya > Arnold > Nuke pipeline
Stars: ✭ 101 (-2.88%)
Mutual labels:  houdini
houdini additional python docs
🐍 Additional documentation of Houdini Python modules
Stars: ✭ 21 (-79.81%)
Mutual labels:  houdini
BubbleH
⚪ Soap film implementation in Sidefx Houdini
Stars: ✭ 50 (-51.92%)
Mutual labels:  houdini
treegen
Vegetation Generation Tool for Houdini
Stars: ✭ 72 (-30.77%)
Mutual labels:  houdini
Bento
🍱 Toolset for Houdini
Stars: ✭ 26 (-75%)
Mutual labels:  houdini
vexed-generation
Polymorphic helper functions & geometry ops for Houdini VEX / OpenCL
Stars: ✭ 32 (-69.23%)
Mutual labels:  houdini
pipeVFX
A Visual Effects pipeline to manage jobs, shots and software assignment, with a simple asset manager. Its extensively integrated with CortexVFX and Gaffer. (and it builds booth, with support for Maya, Houdini and Nuke, if you have then installed!)
Stars: ✭ 47 (-54.81%)
Mutual labels:  houdini
vfxwindow
Python Qt Window class for compatibility between VFX programs
Stars: ✭ 80 (-23.08%)
Mutual labels:  houdini
houdini-demo
CSS Houdini Demo
Stars: ✭ 32 (-69.23%)
Mutual labels:  houdini
hpaste
simple plain text snippet exchange for Houdini
Stars: ✭ 79 (-24.04%)
Mutual labels:  houdini
zhoudini
houdini hda tools focused on procedural modeling environments
Stars: ✭ 47 (-54.81%)
Mutual labels:  houdini
TACTIC-Handler
PySide based TACTIC client for maya, nuke, 3dsmax, houdini, etc
Stars: ✭ 67 (-35.58%)
Mutual labels:  houdini
hipCollection
Houdini Files, Hdas, Effects
Stars: ✭ 22 (-78.85%)
Mutual labels:  houdini
Yurlungur
The universal scripting wrapper for Maya, Houdini and Unreal Engine.
Stars: ✭ 51 (-50.96%)
Mutual labels:  houdini
palladio
Palladio enables the execution of CityEngine CGA rules inside of SideFX Houdini.
Stars: ✭ 92 (-11.54%)
Mutual labels:  houdini
react-demo-projects
Sample React Projects built with different libraries such as Redux, Apollo, React Router etc.
Stars: ✭ 83 (-20.19%)
Mutual labels:  css-module

Squircle CSS Houdini

Cover

A tiny CSS Houdini module that allows adding a squircle shape to HTML elements.


🎻  Demo on GitHub Pages

👾  Codepen examples

🗞  Medium article


🎛  Custom CSS Properties

--squircle-radius

--squircle-radius

The property controls the roundness of the corners.

  • Syntax: <px>
  • Defaul value:
  • Min/Max values:

--squircle-smooth

--squircle-smooth

The property controls the length of bezier guide lines. Could be defined by --squircle-ratio.

  • Syntax: <number>
  • Defaul value: 1
  • Min/Max values: 0.1 / 1

--squircle-outline

--squircle-outline

The property controls squircle outline. There are two methods how too use it with background-mask and mask+:pseudo-element. to find out more check codepen examples.

  • Syntax: <px>
  • Defaul value:
  • Min/Max values:

--squircle-fill

--squircle-fill

The property accepts any color, including variables.

⚠️ Work only with background: paint(squircle);. For mask-image: paint(squircle); use background property.

  • Syntax: <color>
  • Defaul value: #f45
  • Min/Max values:

--squircle-ratio: <number>

This property makes the squircle radius visually the same as the standart border-radius.

  • Syntax: <px>
  • Defaul value: 1.8
  • Min/Max values:

🕹  How to install

In order to make squircle works you need to register the module somewere as a JS script.

Use via external link

// latest version
<script>
  if ("paintWorklet" in CSS) {
    CSS.paintWorklet.addModule(
      "https://www.unpkg.com/css-houdini-squircle/squircle.min.js"
    );
  }
</script>

// or particular version
<script>
  if ("paintWorklet" in CSS) {
    CSS.paintWorklet.addModule(
      "https://www.unpkg.com/[email protected]/squircle.min.js"
    );
  }
</script>

Install via NPM

npm i css-houdini-squircle

Download

You can download the min version of the module from UNPKG

// latest version
https://www.unpkg.com/browse/css-houdini-squircle/squircle.min.js

  Use css-paint-polyfill

In order to get the module work on other browsers, you can use Paint Worklets polyfill.

⚠️ Check for artefacts before deploying.

// use with polifill example
<script>
  (async function () {
    if (!("paintWorklet" in CSS)) {
      await import("css-paint-polyfill");
    }

    CSS.paintWorklet.addModule(
      `https://www.unpkg.com/css-houdini-squircle/squircle.min.js`
    );
  })();
</script>

🚬  TO-DO

  • Animation support
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].