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 UnityEditor; | |
using UnityEngine; | |
[InitializeOnLoad] | |
public static class SceneViewXZFlight | |
{ | |
private static readonly float SlowSpeed = 0.5f; | |
private static readonly float FastSpeed = 2.0f; | |
private static bool movingCamera = false; |
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 std = @import("std"); | |
const ArrayList = std.ArrayList; | |
const Allocator = std.mem.Allocator; | |
// PNG decoder based on stb_image.h implementation, including zlib decompressor. A bit more zig-friendly than original. Compared to | |
// stb_image.h: | |
// - only decodes from a slice (filename or callbacks not supported) | |
// - only decodes to 8-bit channels (any other bit depth is converted, no decoding to 16-bit or float samples) | |
// - requires an allocator (zig style) | |
// - doesn't support interlaced images |
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 * as t from "io-ts"; | |
export type Accessor = { componentType: ComponentType, count: number, type: AccessorType, bufferView?: number, byteOffset?: number, normalized?: boolean, max?: number[], min?: number[], sparse?: AccessorSparse, extensions?: Extensions, extras?: unknown }; | |
export type AccessorSparse = { count: number, indices: AccessorSparseIndices, values: AccessorSparseValues, extensions?: Extensions, extras?: unknown }; | |
export type AccessorSparseIndices = { bufferView: number, componentType: IndexComponentType, byteOffset?: number, extensions?: Extensions, extras?: unknown }; | |
export type AccessorSparseValues = { bufferView: number, byteOffset?: number, extensions?: Extensions, extras?: unknown }; | |
export type Animation = { channels: AnimationChannel[], samplers: AnimationSampler[], name?: string, extensions?: Extensions, extras?: unknown }; | |
export type AnimationChannel = { sampler: number, target: AnimationChannelTarget, extensions?: Extensions, extras?: unknown }; | |
export type AnimationChannelTarg |
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
/* eslint-env node */ | |
module.exports = { | |
extends: [ | |
"eslint:recommended", | |
"plugin:@typescript-eslint/strict-type-checked", | |
"plugin:@typescript-eslint/stylistic-type-checked", | |
"plugin:react-hooks/recommended", | |
], | |
rules: { | |
"@typescript-eslint/member-delimiter-style": ["error", { |
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
{ | |
"compilerOptions": { | |
"incremental": true, | |
"composite": true, | |
"module": "NodeNext", | |
"moduleResolution": "NodeNext", | |
"target": "ES2022", | |
"lib": ["ES2022"], |