Skip to content

Commit

Permalink
Fix: dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
luciobenini committed Oct 30, 2021
1 parent cb932ab commit 641169b
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 41 deletions.
15 changes: 13 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@pittica/gatsby-plugin-canvas-animations",
"private": false,
"description": "Canvas animations collection for GatsbyJS.",
"version": "2.0.0",
"version": "2.0.1",
"author": {
"name": "Lucio Benini",
"email": "info@pittica.com",
Expand All @@ -20,6 +20,7 @@
"animations"
],
"dependencies": {
"@pittica/gatsby-plugin-utils": "^2.0.0",
"gl-mat4": "^1.2.0",
"prop-types": "^15.7.2",
"react": "^17.0.2",
Expand Down
4 changes: 2 additions & 2 deletions src/components/ledwall.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { useEffect, useState, useRef } from "react"
import PropTypes from "prop-types"
import useInterval from "react-useinterval"
import { hexToRgb } from "@pittica/gatsby-plugin-utils"

import rgb from "../utils/rgb"
import { randomize } from "../helpers/ledwall"

export default function Ledwall({
Expand Down Expand Up @@ -56,7 +56,7 @@ export default function Ledwall({
context.lineWidth = lineWidth
context.lineCap = "round"

const { r, g, b } = rgb(primary)
const { r, g, b } = hexToRgb(primary)
let x = gutter
let y = gutter
let alpha = opacity
Expand Down
4 changes: 2 additions & 2 deletions src/components/rain.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { useEffect, useState, useRef } from "react"
import PropTypes from "prop-types"
import useInterval from "react-useinterval"
import { hexToRgb } from "@pittica/gatsby-plugin-utils"

import rgb from "../utils/rgb"
import { create, draw } from "../helpers/rain"

export default function Rain({ color, stroke, parts, timing }) {
Expand All @@ -16,7 +16,7 @@ export default function Rain({ color, stroke, parts, timing }) {
canvas.height = window.innerHeight

if (canvas.getContext) {
const { r, g, b } = rgb(color)
const { r, g, b } = hexToRgb(color)
const context = canvas.getContext("2d")

context.fillStyle = `rgba(${r}, ${g}, ${b}, 0.5)`
Expand Down
6 changes: 3 additions & 3 deletions src/helpers/cube.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import mat4 from "gl-mat4"
import { hexToRgb } from "@pittica/gatsby-plugin-utils"

import rgb from "../utils/rgb"
import { program } from "../utils/shader"
import { create, vertex } from "../utils/buffer"
import { cube, indices } from "../utils/positions"
Expand Down Expand Up @@ -44,7 +44,7 @@ export function info(context) {
}

export function colors(color) {
const { r, g, b } = rgb(color, true)
const { r, g, b } = hexToRgb(color, true)

return {
front: [r, g, b, 1.0],
Expand Down Expand Up @@ -119,7 +119,7 @@ export function apply(context, programInfo, buffers, rotation) {
}

export function prepare(context, background) {
const { r, g, b } = rgb(background, true)
const { r, g, b } = hexToRgb(background, true)

context.clearColor(r, g, b, 1.0)
context.clearDepth(1.0)
Expand Down
31 changes: 0 additions & 31 deletions src/utils/rgb.jsx

This file was deleted.

0 comments on commit 641169b

Please sign in to comment.