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
def create_layers(img, name): | |
from PIL import Image | |
def combine(img, layers): | |
result = Image.new('RGB', img.size, 0x000000) | |
for i in range(img.size[0]): | |
for j in range(img.size[1]): | |
if img.getpixel((i, j)) in layers: | |
result.putpixel((i, j), 0xFFFFFF) | |
else: |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>WebGL 2.0 Simple Example</title> | |
</head> | |
<body style="margin: 0"> | |
<canvas id="draw-target"></canvas> | |
<script type="vertex" id="vs"> | |
#version 300 es |