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
class WebGLRenderer extends React.PureComponent { | |
static contextType = EffectContext; | |
constructor(props) { | |
super(props); | |
this.scene = new Scene(); | |
} | |
componentDidMount() { | |
// Initialize the scene |
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
class ImageBlock extends React.PureComponent { | |
state = { | |
loaded: false | |
}; | |
componentDidMount() { | |
this.ref.addEventListener("load", this.onLoad); | |
} | |
onLoad = () => { |
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
const App = () => { | |
return ( | |
<WebGL> | |
<Headline /> | |
<ComponentOne /> | |
<WebGLElement type={`image`} data={data} /> | |
<WebGLElement type={`image`} data={data} /> | |
<ComponentTwo /> | |
</WebGL> | |
); |
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
class WebGLElement extends React.PureComponent { | |
// Switch to check the type: | |
// this could be expanded to include other elements | |
getComponent(contextValues, props) { | |
switch (props.type) { | |
case "image": | |
return <ImageBlock {...contextValues} {...props} />; | |
break; | |
case "example-image": | |
return <ExampleImage {...contextValues} {...props} />; |
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
const App = () => { | |
return ( | |
<WebGL> | |
<Headline /> | |
<ComponentOne /> | |
<Image /> | |
<Image /> | |
<ComponentTwo /> | |
</WebGL> | |
); |
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
class WebGL extends React.Component { | |
state = { | |
elements: [], | |
renderer: null, | |
scene: null | |
}; | |
addImage = (image) => { | |
//.. Create Image texture & push into webgl context | |
} |
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
.no-focus-outline:focus { | |
outline: none; | |
} |
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
# Simple Role Syntax | |
# ================== | |
role :app, %w{[email protected]} ## Your IP | |
set :branch, "staging" | |
set :deploy_to, "/var/www/#{fetch(:application)}/staging" |
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
set :application, "wordpress-workflow" | |
set :repo_url, "[email protected]:DrewDahlman/wordpress-workflow.git" | |
set :user, 'www-data' | |
# Default value for :scm is :git | |
set :scm, :git | |
# Default value for :format is :pretty | |
set :format, :pretty |
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
set :application, "my_app_name" | |
set :repo_url, "[email protected]:me/my_repo.git" | |
# Default branch is :master | |
# ask :branch, `git rev-parse --abbrev-ref HEAD`.chomp | |
# Default deploy_to directory is /var/www/my_app_name | |
# set :deploy_to, "/var/www/my_app_name" | |
# Default value for :format is :airbrussh. |
NewerOlder