This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias gs="git status" | |
alias gst="git status" | |
alias ga='git add' | |
alias gc='git commit -v' | |
alias gca='git commit -v -a' | |
alias gb='git branch' | |
alias gba='git branch -a' | |
alias gco='git checkout' | |
alias gcm='git checkout master' | |
alias gp='git push' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Text } from 'pixi.js'; | |
import { PixiComponent } from '@inlet/react-pixi'; | |
const FastText = PixiComponent('FastText', { | |
create: props => new Text(props.text), | |
applyProps: (instance, oldProps, props) => { | |
const { x, y, text } = props; | |
if (x !== oldProps.x || y !== oldProps.y) { | |
instance.x = x; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
applyProps: (instance, oldProps, props) => { | |
const { x, y, text } = props; | |
instance.x = x; | |
instance.y = y; | |
instance.text = text; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
applyProps: (instance, oldProps, props) => { | |
const { x, y, width, height, fill, alpha } = props; | |
instance.clear(); | |
instance.beginFill(fill); | |
instance.drawRect(x, y, width, height); | |
instance.endFill(); | |
instance.alpha = alpha; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Graphics } from 'pixi.js'; | |
import { PixiComponent, Stage } from '@inlet/react-pixi'; | |
const Rectangle = PixiComponent('Rectangle', { | |
create: props => new Graphics(), | |
applyProps: (instance, oldProps, props) => { | |
const { x, y, width, height, fill, alpha } = props; | |
if (x !== oldProps.x || y !== oldProps.y || width !== oldProps.width || height !== oldProps.height || fill !== oldProps.fill) { | |
instance.clear(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
instance.alpha = alpha; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
instance.clear(); | |
instance.beginFill(fill); | |
instance.drawRect(x, y, width, height); | |
instance.endFill(); | |
instance.alpha = alpha; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Graphics } from 'pixi.js'; | |
import { PixiComponent, Stage } from '@inlet/react-pixi'; | |
const Rectangle = PixiComponent('Rectangle', { | |
create: props => new Graphics(), | |
applyProps: (instance, _, props) => { | |
const { x, y, width, height, fill, alpha } = props; | |
instance.clear(); | |
instance.beginFill(fill); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import {Circle} from "./Primitives"; | |
import {Container} from "@inlet/react-pixi"; | |
export const NodeView: React.FC<{node: Node}> = (props) => { | |
return ( | |
<Container x={props.node.x} y={props.node.y}> | |
<Circle x={0} y={0} radius={20} color={0x0000ff} /> | |
</Container> | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import {Stage} from "@inlet/react-pixi"; | |
export const Graph: React.FC<{ | |
nodes: Node[]; | |
edges: Edge[]; | |
}> = (props) => { | |
return ( | |
<Stage> | |
{props.edges.map((edge) => { |
NewerOlder