.
├── .vscode/
│ └── settings.json
├── manifest.json
└── manifest.schema.json
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 Reactive from 'Reactive'; | |
export class Subject<T> { | |
private readonly _signalSource: StringSignalSource; | |
private readonly _eventSource: Omit<EventSource<T>, 'subscribe'> & { subscribe(callback: (args: T) => void): Subscription }; | |
constructor() { | |
this._signalSource = Reactive.stringSignalSource(uuid()); | |
this._eventSource = this._signalSource.signal.monitor() as any; | |
this._eventSource.subscribe = (callback: (value: T) => void) => |
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 { htmlParser } from './htmlparser' | |
const DEBUG = false; | |
const debug = DEBUG ? console.log.bind(console) : function () { }; | |
function removeDOCTYPE(html: string) { | |
return html | |
.replace(/<\?xml.*\?>\n/, '') | |
.replace(/<!doctype.*\>\n/, '') | |
.replace(/<!DOCTYPE.*\>\n/, ''); |
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 { Grid, GridProps } from '@chakra-ui/react'; | |
import { FC } from 'react'; | |
export interface ZStackProps extends Omit<GridProps, 'justifyItems' | 'alignItems'> { | |
/** https://developer.apple.com/documentation/swiftui/alignment */ | |
alignment?: 'topLeading' | 'top' | 'topTrailing' | 'leading' | 'center' | 'trailing' | 'bottomLeading' | 'bottom' | 'bottomTrailing'; | |
} | |
export const ZStack: FC<ZStackProps> = ({ alignment = 'center', ...props }) => { | |
const justifyItems = (() => { |
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
function pinInitValues<T extends readonly string[]>(signal: ISignal, values: T): Promise<{ [K in T[number]]: number }> { | |
const signals = values.reduce((pre, cur) => { | |
pre[cur] = signal[cur]; | |
return pre; | |
}, {}) | |
return new Promise(resolve => | |
Reactive.monitorMany(signals, { fireOnInitialValue: true }).select('newValues').take(1).subscribe(resolve) | |
); | |
} |
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 Time from 'Time'; | |
import Scene from 'Scene'; | |
import Patches from 'Patches'; | |
import Textures from 'Textures'; | |
import Reactive from 'Reactive'; | |
import Animation from 'Animation'; | |
import TouchGestures from 'TouchGestures'; | |
// Constants for the default visual and interaction style. | |
const TARGET_ENVELOPE_SCALE = 1.1; |
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
using System; | |
using System.Collections.Generic; | |
namespace OpenSeaAPI | |
{ | |
public class AssetContract | |
{ | |
public string address { get; set; } | |
public string asset_contract_type { get; set; } | |
public DateTime created_date { get; set; } |
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
using UnityEngine; | |
public static class TextureTool | |
{ | |
public static Texture2D rotateTexture(Texture2D originalTexture, bool clockwise) | |
{ | |
Color32[] original = originalTexture.GetPixels32(); | |
Color32[] rotated = new Color32[original.Length]; | |
int w = originalTexture.width; | |
int h = originalTexture.height; |
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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using Newtonsoft.Json.Linq; | |
using UnityEditor; | |
using UnityEditor.AddressableAssets.Settings; | |
using UnityEngine; | |
/// <summary> |
http://docs.unity3d.com/Manual/webgl-building.html
http://docs.unity3d.com/Manual/ReducingFilesize.html
https://www.youtube.com/watch?v=gVUgF2ZHveo - AssetBundles
When we compile a WebGL project, it generates 3 folders along with html file.
NewerOlder